Made warning optional since test cases involved non-hex characters

This commit is contained in:
Ryan Chernoff 2025-04-22 15:31:12 -04:00
parent e231d1b37a
commit 23bfe8740f

View file

@ -42,6 +42,11 @@ class XOR extends Operation {
"name": "Null preserving",
"type": "boolean",
"value": false
},
{
"name": "Filter Key",
"type": "boolean",
"value": true
}
];
}
@ -54,7 +59,7 @@ class XOR extends Operation {
run(input, args) {
input = new Uint8Array(input);
try {
const key = Utils.convertToByteArray(args[0].string || "", args[0].option, "None", true),
const key = Utils.convertToByteArray(args[0].string || "", args[0].option, args[3] ? "Auto" : "None", true),
[, scheme, nullPreserving] = args;
return bitOp(input, key, xor, nullPreserving, scheme);
@ -91,4 +96,4 @@ class XOR extends Operation {
}
export default XOR;
export default XOR;