Updated a range of operations to use ArrayBuffers instead of byteArrays to improve performance with large files.

This commit is contained in:
n1474335 2019-07-29 17:09:46 +01:00
parent 3a8b362dfd
commit 0e95ad8ed6
37 changed files with 112 additions and 84 deletions

View file

@ -25,7 +25,7 @@ class XORBruteForce extends Operation {
this.module = "Default";
this.description = "Enumerate all possible XOR solutions. Current maximum key length is 2 due to browser performance.<br><br>Optionally enter a string that you expect to find in the plaintext to filter results (crib).";
this.infoURL = "https://wikipedia.org/wiki/Exclusive_or";
this.inputType = "byteArray";
this.inputType = "ArrayBuffer";
this.outputType = "string";
this.args = [
{
@ -72,11 +72,12 @@ class XORBruteForce extends Operation {
}
/**
* @param {byteArray} input
* @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {string}
*/
run(input, args) {
input = new Uint8Array(input);
const [
keyLength,
sampleLength,