This commit is contained in:
George J 2018-05-01 17:02:49 +01:00
commit 6f53a791af

View file

@ -35,7 +35,6 @@ const BitwiseOp = {
if (scheme === "Cascade") k = input[i + 1] || 0; if (scheme === "Cascade") k = input[i + 1] || 0;
o = input[i]; o = input[i];
x = nullPreserving && (o === 0 || o === k) ? o : func(o, k); x = nullPreserving && (o === 0 || o === k) ? o : func(o, k);
result.push(x);
if (scheme && if (scheme &&
scheme !== "Standard" && scheme !== "Standard" &&
!(nullPreserving && (o === 0 || o === k))) { !(nullPreserving && (o === 0 || o === k))) {
@ -46,8 +45,13 @@ const BitwiseOp = {
case "Output differential": case "Output differential":
key[i % key.length] = o; key[i % key.length] = o;
break; break;
case "Cascade":
k ^= input[i + 1];
x = nullPreserving && (o === 0 || o === k) ? o : func(o, k);
break;
} }
} }
result.push(x);
} }
return result; return result;