Closed TechNov closed 5 years ago
@ahsankhatri can you take a look into this issue?
@TechNov I took your cipher and tried to decrypt with Android & PHP as well, it seems your cipher is not generated on AES/CBC/256. Give a try with file Android/ExampleActivity.kt
in this repo first and try to decrypt in PHP. It'll work for sure as it work for me with the following:
Key: Awpj5scJh9gdeKBdnpl5df5d8sqPlfNe
Cipher: mVuJdcakQTKQq4mO+iyBjQdo0Iyc5EybCZbQuDgMCtWtoBiCN4B9MI59WD+/w3B9bUO18EYUR8ab88/0D3NuIjiPOxSU6w04txa4P5g6u9lIhElnkNYHwub/kejIQdeB
FYI: Your cipher length should be 128 as mine if you're not using custom options to encrypt.
Closing issue due to inactivity
Hello, I trying to encrypt test in Android Java and decrypt in php using encryptPlainTextWithRandomIV in Android and decryptCipherTextWithRandomIV in php. But php can't decrypt the crypted text from android. I use the same Key both.
--------------Android code--------------
String AES_CRYPT_KEY = "Awpj5scJh9gdeKBdnpl5df5d8sqPlfNe"; AESEncryption aesEncryption= new AESEncryption(); String text="2019/01/18 20:04:55#QNd7OpVZ4w56Z8VZ8j5HcHk7UdxinD#U_4752256_nsia#1234567890"; Log.d("AES crypt", aesEncryption.encryptPlainTextWithRandomIV(AES_CRYPT_KEY, text));
Android encryption result: jiAfm/9C+whU/EOG4MW52LNnBNQflM5Ajx2qSdncaL++tF2mpLl/oiPTuBwFCceftUAj9UoaEbE9HqYXVgh/ug== -------------PHP code -----------------
// OUTPUT is Empty........... Decrypted:
Help please