Removed input extraction from try catch block to seperate input errors from key errors

This commit is contained in:
Ryan Chernoff 2025-04-21 14:58:37 -04:00
parent 01edeb28a6
commit d3f943bee4

View file

@ -52,8 +52,8 @@ class XOR extends Operation {
* @returns {byteArray} * @returns {byteArray}
*/ */
run(input, args) { run(input, args) {
input = new Uint8Array(input);
try { try {
input = new Uint8Array(input);
const key = Utils.convertToByteArray(args[0].string || "", args[0].option), const key = Utils.convertToByteArray(args[0].string || "", args[0].option),
[, scheme, nullPreserving] = args; [, scheme, nullPreserving] = args;