mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Updated a range of operations to use ArrayBuffers instead of byteArrays to improve performance with large files.
This commit is contained in:
parent
3a8b362dfd
commit
0e95ad8ed6
37 changed files with 112 additions and 84 deletions
|
@ -24,7 +24,7 @@ class ToBase62 extends Operation {
|
|||
this.module = "Default";
|
||||
this.description = "Base62 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. The high number base results in shorter strings than with the decimal or hexadecimal system.";
|
||||
this.infoURL = "https://wikipedia.org/wiki/List_of_numeral_systems";
|
||||
this.inputType = "byteArray";
|
||||
this.inputType = "ArrayBuffer";
|
||||
this.outputType = "string";
|
||||
this.args = [
|
||||
{
|
||||
|
@ -36,11 +36,12 @@ class ToBase62 extends Operation {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {string} input
|
||||
* @param {ArrayBuffer} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
input = new Uint8Array(input);
|
||||
if (input.length < 1) return "";
|
||||
|
||||
const ALPHABET = Utils.expandAlphRange(args[0]).join("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue