mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-14 10:14:53 -04:00
Fixed error where test for XOR operation with valid key had an invalid key
This commit is contained in:
parent
70be54e262
commit
9a193affbf
1 changed files with 2 additions and 2 deletions
|
@ -979,7 +979,7 @@ smothering ampersand abreast`;
|
||||||
{ string: "zz 00 11", option: "Hex" },
|
{ string: "zz 00 11", option: "Hex" },
|
||||||
|
|
||||||
{ string: "4~ 00 11", option: "Hex" }
|
{ string: "4~ 00 11", option: "Hex" }
|
||||||
];
|
];
|
||||||
invalidKeys.forEach(invalidKey => {
|
invalidKeys.forEach(invalidKey => {
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
chef.XOR("fe023da5", { key: invalidKey, filterKey: false });
|
chef.XOR("fe023da5", { key: invalidKey, filterKey: false });
|
||||||
|
@ -989,7 +989,7 @@ smothering ampersand abreast`;
|
||||||
|
|
||||||
it("XOR: should not throw 'Invalid Characters in key' error when key contains only valid characters", () => {
|
it("XOR: should not throw 'Invalid Characters in key' error when key contains only valid characters", () => {
|
||||||
assert.strictEqual(chef.XOR("fe023da5", {
|
assert.strictEqual(chef.XOR("fe023da5", {
|
||||||
key: "73 6f 6d 65",
|
key: "736f6d65",
|
||||||
filterKey: false
|
filterKey: false
|
||||||
}).toString(),
|
}).toString(),
|
||||||
"\u0015\n]W@\u000b\fP");
|
"\u0015\n]W@\u000b\fP");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue