1. CryptoJS
public final static int AES_KEY_LENGTH = 32;
private final static byte[] IV = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
private final static String ALGORITHM = "AES";
private final static String MODE = "AES/CBC/PKCS5Padding";
//
public static byte[] decrypt(byte[] decryptKey, byte[] decryptBytes) throws Exception {
IvParameterSpec zeroIv = new IvParameterSpec(IV);
SecretKeySpec key = new SecretKeySpec(decryptKey, ALGORITHM);
Cipher cipher = Cipher.getInstance(MODE);
cipher.init(Cipher.DECRYPT_MODE, key, zeroIv);
return cipher.doFinal(decryptBytes);
}
the algorithm looks confused, and the big god who knows it will show you what"s wrong, and I don"t appreciate it very much.