scottyab / AESCrypt-Android

Simple API to perform AES encryption on Android. This is the Android counterpart to the AESCrypt library Ruby and Obj-C (with the same weak security defaults :( ) created by Gurpartap Singh. https://github.com/Gurpartap/aescrypt
Apache License 2.0
641 stars 191 forks source link

IV must be 16 bytes long #18

Open nicchong opened 8 years ago

nicchong commented 8 years ago

Hello,

Im getting (IV must be 16bytes long) when using the advance mode.

My encryptedText = "HE9257Ykdrnb7zZTbNYLcLNzsg24t2aEftUZ7Tr0BU0=" My IV = "618wNQX6K3k2343c" //My IV is 16byte long

I base 64 decode both using Base64.decode(encryptedText, Base64.NO_WRAP) and Base64.decode(IV, Base64.NO_WRAP) then pass in (SecretKeySpec, byte[] IV, byte[] encryptedText ) as parameter for advance mode, but gave me an error (IV must be 16 bytes long).