- 当前 Bug 的表现(可附上截图)
执行crypto.TripleDES().decrypt 时,出现下面错误:
VM5902:1 URIError: URI malformed
at decodeURIComponent (<anonymous>)
at Function.value (appservice.js:984)
at toString (appservice.js:984)
at t.onShow (binded.js? [sm]:123)
at t.<anonymous> (WAService.js:19)
at Xt (WAService.js:20)
at sn (WAService.js:20)
at un (WAService.js:20)
at Function.<anonymous> (WAService.js:20)
at L.<anonymous> (WAService.js:19)
- 提供一个最简复现 Demo
const mi = new crypto.TripleDES().encrypt('0000000', "1111111", {
iv: 8,
mode: crypto.Mode['CBC'],
padding: crypto.Padding['NoPadding']
});
console.log('encrypt:', mi.toString());
var str = mi.toString();
const v = new crypto.TripleDES().decrypt(str, "1111111", {
iv: 8,
mode: crypto.Mode['CBC'],
padding: crypto.Padding['NoPadding']
});
console.log('decrypt:', v.toString(crypto.Utf8));
console.log('');
这种模式下不能为NoPadding