mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-14 18:25:16 -04:00
Made warning optional since test cases involved non-hex characters
This commit is contained in:
parent
e231d1b37a
commit
23bfe8740f
1 changed files with 7 additions and 2 deletions
|
@ -42,6 +42,11 @@ class XOR extends Operation {
|
||||||
"name": "Null preserving",
|
"name": "Null preserving",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"value": false
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Filter Key",
|
||||||
|
"type": "boolean",
|
||||||
|
"value": true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -54,7 +59,7 @@ class XOR extends Operation {
|
||||||
run(input, args) {
|
run(input, args) {
|
||||||
input = new Uint8Array(input);
|
input = new Uint8Array(input);
|
||||||
try {
|
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;
|
[, scheme, nullPreserving] = args;
|
||||||
|
|
||||||
return bitOp(input, key, xor, nullPreserving, scheme);
|
return bitOp(input, key, xor, nullPreserving, scheme);
|
||||||
|
@ -91,4 +96,4 @@ class XOR extends Operation {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default XOR;
|
export default XOR;
|
Loading…
Add table
Add a link
Reference in a new issue