I have a class with a utility method for encrypting / decrypting text. The class is listed as below. The class works great when only on Windows platform, but when it tries to decrypt some text (that was originally encrypted on Windows) on AIX or Mac OS X, I get this exception... Any ideas why the inconsistencies between platforms?
javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.SunJCE_h.b(DashoA6275) at com.sun.crypto.provider.SunJCE_h.b(DashoA6275) at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA6275) at javax.crypto.Cipher.doFinal(DashoA12275)
The method looks like this...I've changed the byte with the key for security purposes...