Sunday, March 18, 2012

Re: [android-developers] javax.crypto.BadPaddingException: pad block corrupted

2012/3/18 Italo Mendonça Rocha <italomr@gmail.com>:
> I'm trying to encrypt and decrypt a file using a key that the user typed.
> All these operations are done in Android. At the moment I decrypt I get a
> javax.crypto.BadPaddingException: pad block corrupted. The same code works
> normally on Windows PC. Why?

Your code looks mostly OK. Check the encrypted file size, and compare
to what you get on Windows. 'Pad block corrupted' usually means you
are missing a few bytes.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment