Hi,
I too am facing the same exception BadPaddingException: Given final block not properly padded
I have tried converting the ChiperText String to bytes using the Base64Decoder as well as String.getBytes(). even after doing this I see the same Exception.
In my case The encryption is being done in Dot Net code. and the decryption happens in Java Code.
I suspect the Issue here in the Below Code:
The Encryption Algorithm is TripleDES ( DESede).
and to encrypt the mode and padding is given as below:
Mode: CBC
Padding = Padding.Zeros
But I am not sure which Padding mode to be used. I am using CBC/PKCS5Padding mode/padding.
Can any one specify which is the equivalent Padding mode to the DotNet Zeros Padding.
You Suggestions are most awaited..
Thanks