3des加密:Given final block not properly padded
解密的时候报错:
javax.crypto.BadPaddingException: Given final block not properly padded
咋整?
详细错误信息:
javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.DESedeCipher.engineDoFinal(DashoA6275)
at com.sun.crypto.provider.DESedeCipher.engineDoFinal(DashoA6275)
at javax.crypto.Cipher.doFinal(DashoA6275)
at ThreeDesTool.decryptMode(ThreeDesTool.java:41) //就是这里的问题。一个解密的方法。
at Authentication.Authentication(Authentication.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)