mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 08:16:17 -04:00
Updated XOR to include Cascade scheme
This commit is contained in:
parent
5aa13f2428
commit
70d4e3394c
2 changed files with 3 additions and 2 deletions
|
@ -25,6 +25,7 @@ export function bitOp (input, key, func, nullPreserving, scheme) {
|
|||
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
k = key[i % key.length];
|
||||
if (scheme === "Cascade") k = input[i + 1] || 0;
|
||||
o = input[i];
|
||||
x = nullPreserving && (o === 0 || o === k) ? o : func(o, k);
|
||||
result.push(x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue