Skip to Content
0
Former Member
May 04, 2013 at 04:14 PM

BadPaddingException: Invalid PKCS#5 padding: not all padding bytes are equal!

675 Views

Hi,

I am trying to decrypt an encrypted customer record that has Last Name, First Name and Middle Name(All these 3 fields come encrypted).

I am getting this exception while decrypting the middle name. Tried sending trimmed encrypted value to the decryption module and also non-trimmed encrypted value to the decryption module but didn't yield any furitful result.

com.triversity.security.service.GeneralTWSecurityException: com.triversity.security.service.GeneralTWSecurityException: javax.crypto.BadPaddingException: Invalid PKCS#5 padding: not all padding bytes are equal!

I am using TW Security libraries for decryption provided by SAP.

Any pointers to this issue is truly appreciated.

Thanks,

Sarat