Linux AES加密解密报错Given final block not properly padded
时间:2020-12-14 14:39:49
收藏:0
阅读:135
解决办法:
//防止linux下 随机生成key
SecureRandom secureRandom = SecureRandom.getInstance(“SHA1PRNG” );
secureRandom.setSeed(keycontent.getBytes());
// 根据密钥初始化密钥生成器
kgen.init(keyNum, secureRandom);
原文:https://www.cnblogs.com/YinXuanZhiZhi9/p/14132842.html
评论(0)