From 1a6d238537ca872450aa6132889447c469c82ba0 Mon Sep 17 00:00:00 2001 From: Ryan Chernoff Date: Mon, 21 Apr 2025 15:05:49 -0400 Subject: [PATCH] For the sake of backwards compatibility, a boolean is passed to tell the key extraction function that an error should be thrown on invalid input. --- src/core/operations/XOR.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/operations/XOR.mjs b/src/core/operations/XOR.mjs index 87e4ebb3..09a1e840 100644 --- a/src/core/operations/XOR.mjs +++ b/src/core/operations/XOR.mjs @@ -54,7 +54,7 @@ class XOR extends Operation { run(input, args) { input = new Uint8Array(input); try { - const key = Utils.convertToByteArray(args[0].string || "", args[0].option), + const key = Utils.convertToByteArray(args[0].string || "", args[0].option, true), [, scheme, nullPreserving] = args; return bitOp(input, key, xor, nullPreserving, scheme);