This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Security and the fly likes javax.crypto.BadPaddingException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "javax.crypto.BadPaddingException" Watch "javax.crypto.BadPaddingException" New topic
Author

javax.crypto.BadPaddingException

Arpit Panwar
Greenhorn

Joined: Jul 16, 2009
Posts: 12

i keep getting badpading exception.
can anyone help me out on how to pad the message bits.


SCJP 75%
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
This exception usually happens when encrypted data, or an encryption key, is treated like character data (in other words, as a string). Here's a full example of AES encryption/decryption: http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.crypto.BadPaddingException
 
Similar Threads
Encrypted values all contain same final characters
BadPaddingException
Java Cryptography
encoding in java and decoding in perl
AES Encryption Service