mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 07:45:00 -04:00
Corrected equivalence in AES key padding
This commit is contained in:
parent
80379e3df1
commit
a811041fe2
2 changed files with 1 additions and 3 deletions
|
@ -126,7 +126,6 @@ class AESDecrypt extends Operation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (targetKeySize !== 0) {
|
if (targetKeySize !== 0) {
|
||||||
const originalLength = key.length;
|
|
||||||
key = key.padEnd(targetKeySize, keyPadding == "Null" ? "\0" : key);
|
key = key.padEnd(targetKeySize, keyPadding == "Null" ? "\0" : key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,8 +119,7 @@ class AESEncrypt extends Operation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (targetKeySize !== 0) {
|
if (targetKeySize !== 0) {
|
||||||
const originalLength = key.length;
|
key = key.padEnd(targetKeySize, keyPadding === "Null" ? "\0" : key);
|
||||||
key = key.padEnd(targetKeySize, keyPadding == "Null" ? "\0" : key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue