We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d169a6 commit 5f60f1bCopy full SHA for 5f60f1b
1 file changed
src/javascript/EncryptHelper.js
@@ -447,9 +447,10 @@ export function mgf1_sha256(seed, maskLen) {
447
export function EnAONT(plain) {
448
const len = plain.length;
449
if (len < 2) {
450
- throw new Error(
+ /*throw new Error(
451
"Insufficient payload length. Payload too short for AONT Feistel split."
452
- );
+ );*/
453
+ return plain; //如果密文太短(长度只有一字节),无法执行,就自动跳过执行。
454
}
455
456
// 动态计算切分点。即使长度为奇数也能完美处理
@@ -493,9 +494,10 @@ export function EnAONT(plain) {
493
494
export function DeAONT(cipher) {
495
const len = cipher.length;
496
497
498
499
500
+ return cipher; //如果密文太短(长度只有一字节),无法执行,就自动跳过执行。
501
502
503
// 按照正向相同的切分点切分
0 commit comments