Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem decrypting a string

843811May 19 2007 — edited May 20 2007
hi,

I've a problem with cryptography: I'm trying to encrypt a string, put it in another string containing XML tags, send this XML by AJAX to a Servlet, and then decrypt the string.
I can't send a byte char using AJAX, so I have to convert the result of the encryption with the .toString() method.
When the string arrives to the Servlet, I reconvert it using .getBytes() method and I try to decrypt it, but i get this exception:

javax.crypto.BadPaddingException: Data must start with zero
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2007
Added on May 19 2007
3 comments
318 views