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.
This commit is contained in:
parent
d3f943bee4
commit
1a6d238537
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user