MCPcopy Index your code
hub / github.com/CDSecLab/MJXT / decrypt

Method decrypt

src/main/java/utils/AESUtil.java:38–50  ·  view source on GitHub ↗
(byte[] K_e,byte[] ciphertext)

Source from the content-addressed store, hash-verified

36 }
37
38 public static byte[] decrypt(byte[] K_e,byte[] ciphertext) {
39 IvParameterSpec iv = new IvParameterSpec(InitVector.getBytes(StandardCharsets.UTF_8));
40 try {
41 SecretKeySpec secretKeySpec = new SecretKeySpec(K_e, "AES");
42 Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
43 cipher.init(Cipher.DECRYPT_MODE, secretKeySpec,iv);
44 byte[] res = cipher.doFinal(ciphertext);
45 return res;
46 } catch (Exception e){
47
48 }
49 return null;
50 }
51}

Callers 9

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls

no outgoing calls

Tested by 9

mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76
mainMethod · 0.76