mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Improved performance of str/array buffer conversions
This commit is contained in:
parent
7a2517fd61
commit
659325c85a
8 changed files with 30 additions and 23 deletions
|
@ -26,7 +26,7 @@ class FromCharcode extends Operation {
|
|||
this.description = "Converts unicode character codes back into text.<br><br>e.g. <code>0393 03b5 03b9 03ac 20 03c3 03bf 03c5</code> becomes <code>Γειά σου</code>";
|
||||
this.infoURL = "https://wikipedia.org/wiki/Plane_(Unicode)";
|
||||
this.inputType = "string";
|
||||
this.outputType = "byteArray";
|
||||
this.outputType = "ArrayBuffer";
|
||||
this.args = [
|
||||
{
|
||||
"name": "Delimiter",
|
||||
|
@ -44,7 +44,7 @@ class FromCharcode extends Operation {
|
|||
/**
|
||||
* @param {string} input
|
||||
* @param {Object[]} args
|
||||
* @returns {byteArray}
|
||||
* @returns {ArrayBuffer}
|
||||
*
|
||||
* @throws {OperationError} if base out of range
|
||||
*/
|
||||
|
@ -77,7 +77,7 @@ class FromCharcode extends Operation {
|
|||
for (i = 0; i < bites.length; i++) {
|
||||
latin1 += Utils.chr(parseInt(bites[i], base));
|
||||
}
|
||||
return Utils.strToByteArray(latin1);
|
||||
return Utils.strToArrayBuffer(latin1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue