/** * AES-128-CBC decryption. The IV is assumed to be the first 16 bytes * of the cipher text. * * @param key * @param cipherText * * @return the plain text * * @throws GeneralSecurityException */ public static byte[] aes128cbcDecrypt(byte[] key, byte[] cipherText) throws GeneralSecurityException { byte iv[] = new byte[CIPHER_BLOCK_SIZE]; System.arraycopy(cipherText, 0, iv, 0, iv.length); return aes128cbcDecryptWithIv(key, iv, cipherText, iv.length); }
/** * AES-128-CBC decryption. The IV is assumed to be the first 16 bytes * of the cipher text. * * @param key * @param cipherText * * @return the plain text * * @throws GeneralSecurityException */ public static byte[] aes128cbcDecrypt(byte[] key, byte[] cipherText) throws GeneralSecurityException { byte iv[] = new byte[CIPHER_BLOCK_SIZE]; System.arraycopy(cipherText, 0, iv, 0, iv.length); return aes128cbcDecryptWithIv(key, iv, cipherText, iv.length); }
/** * AES-128-CBC decryption. The IV is assumed to be the first 16 bytes * of the cipher text. * * @param key * @param cipherText * * @return the plain text * * @throws GeneralSecurityException */ public static byte[] aes128cbcDecrypt(byte[] key, byte[] cipherText) throws GeneralSecurityException { byte iv[] = new byte[CIPHER_BLOCK_SIZE]; System.arraycopy(cipherText, 0, iv, 0, iv.length); return aes128cbcDecryptWithIv(key, iv, cipherText, iv.length); }
/** * AES-128-CBC decryption. The IV is assumed to be the first 16 bytes * of the cipher text. * * @param key * @param cipherText * * @return the plain text * * @throws GeneralSecurityException */ public static byte[] aes128cbcDecrypt(byte[] key, byte[] cipherText) throws GeneralSecurityException { byte iv[] = new byte[CIPHER_BLOCK_SIZE]; System.arraycopy(cipherText, 0, iv, 0, iv.length); return aes128cbcDecryptWithIv(key, iv, cipherText, iv.length); }
/** * AES-128-CBC decryption. The IV is assumed to be the first 16 bytes * of the cipher text. * * @param key * @param cipherText * * @return the plain text * * @throws GeneralSecurityException */ public static byte[] aes128cbcDecrypt(byte[] key, byte[] cipherText) throws GeneralSecurityException { byte iv[] = new byte[CIPHER_BLOCK_SIZE]; System.arraycopy(cipherText, 0, iv, 0, iv.length); return aes128cbcDecryptWithIv(key, iv, cipherText, iv.length); }