I am trying to decrypt email id and get this exception. My encryption is successfully but while decryption i get this.
Caused by: javax.crypto.BadPaddingException: pad block corrupted
at org.bouncycastle.jce.provider.JCEBlockCipher.engineDoFinal(JCEBlockCipher.java:715)
at javax.crypto.Cipher.doFinal(Cipher.java:1090)
Help Appreciated
Either the ciphertext has become corrupted, or you are not using the same block size or padding to decrypt as was used to encrypt.
Can you show us the code you’re using to encrypt and decrypt?