i'm having this exception, when i tried to decrypt a msg coming frm server... "javax.crypto.BadPaddingException: Given final block not properly padded". here is my code.
You should read your own code. Your are clearly processing the key differently for encryption and decryption. Also, you are using defaults in the getInstance() method in the encryption code but you are fully specifying the mode and padding in that same method in the decryption code? How do you know they'll be the same?
Nice to meet you.
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!