Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT

I'm storing AES decryption key in AndroidKeyStore to decrypt data from SQLiteDB. Unfortunately, sometimes I get this error (Any android device and any API) rarely.

I would like to know what exactly this error means. javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT.

Where I can find list of these error:*?

like image 350
Shahdab Aalam Saifi Avatar asked Dec 01 '25 02:12

Shahdab Aalam Saifi


1 Answers

I had same problem, because I've initialised cipher for ENCRYPT_MODE, but before I've called doFinal for encrypt, I've re-initialised same cipher for DECRYPT_MODE in another place. So, there haven't to be same race condition and that could be fine.

like image 51
senneco Avatar answered Dec 04 '25 23:12

senneco



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!