Java Encryption issue

Posted by r1k0 on Stack Overflow See other posts from Stack Overflow or by r1k0
Published on 2010-03-17T15:45:53Z Indexed on 2010/03/17 17:21 UTC
Read the original article Hit count: 401

Filed under:
|
|

I am using PBE encryption to encrypt and decrypt some text on an Android application but I get the BadPaddingException: with the "pad block corrupted" message when I use the wrong private key to decrypt the text. My question, since I am not well versed with encryption in Java, is if this is the normal behavior of the encryption API, because I need to do some logic in the case when the wrong key is entered, but I do not know the private key, nor do I store it anywhere (storing just the encrypted and decrypted check text).

Thanks, Mihai

© Stack Overflow or respective owner

Related posts about java

Related posts about encryption