读书人

des加密和好密出错

发布时间: 2012-07-31 12:33:46 作者: rapoo

des加密和解密出错
在一个jsp页面里面加密,到另一个jsp页面解密就会报异常。
异常信息:javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher

但是如果我在一个jsp页面里面加密,就在本页面里面解密就不会有任何问题。是什么原因,哪位知道。

[解决办法]
Input length must be multiple of 8 when decrypting with padded cipher
这个提示意思是:
输入的长度必须是 8 的倍数?
[解决办法]
你两个页面的页头是不是一样的?

读书人网 >J2EE开发

热点推荐