Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BadPaddingException: Data must start with zero

 
Anita Singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have saved the password in database in Encrypted form successfully.But it shows me "javax.crypto.BadPaddingException: Data must start with zero" Exception while Decryption.I m posting here both the Encryption & Decryption code.Please Help Me.


/*Encryption program is working fine*/
************************************************************************



Please help me
Thanks in Advance
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems like you are using one set of key pair for encrypting and another for decrypting.
 
Anita Singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rahul
I got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic