javax.crypto.IllegalBlockSizeException: last block incomplete in decryption

javax.crypto.IllegalBlockSizeException: last block incomplete in decryption

用使用AES加密后还需使用Base64编码方式再进行一次加密,所以解密的时候需要先用Base64解密,再用AES的方法解密之后再次报错同样的错误,求解析。

javax.crypto.IllegalBlockSizeException: last block incomplete in decryption
at org.bouncycastle.jce.provider.JCEBlockCipher.engineDoFinal(Unknown Source)
at javax.crypto.Cipher.doFinal(Cipher.java:2164)
at com.*.common.utils.AESUtils.decryptAES(AESUtils.java:126)
at com.*.common.utils.AESUtils.decode(AESUtils.java:186)
at com.*.yyinfo.utils.BusinessUtils.ajaxData(BusinessUtils.java:97)
at com.*.yyinfo.utils.BusinessUtils.ajaxDataObj(BusinessUtils.java:67)

上一篇:带你手把手讲解一个复杂动效的自定义绘制,搞懂开源框架设计思想真的这么重要吗


下一篇:k8s学习十一-数据持久化