wechat-java-sdk icon indicating copy to clipboard operation
wechat-java-sdk copied to clipboard

解密

Open FS1360472174 opened this issue 6 years ago • 2 comments

解密使用PKCS5PADDING没有遇到过错误吗 有些加密信息解密的时候报 javax.crypto.BadPaddingException: Given final block not properly padded at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:989) ~[?:?]

FS1360472174 avatar Apr 11 '18 09:04 FS1360472174

没有遇到过,看异常是结尾没有补齐数据。是不是没传完?

sinofool avatar Apr 12 '18 03:04 sinofool

不是,官网说的是用7PADDING,但是实际用5也可以解密。 估计有可能是频繁更新session-key不一致导致的

FS1360472174 avatar Apr 15 '18 02:04 FS1360472174