mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36: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
|
@ -68,8 +68,8 @@ class HammingDistance extends Operation {
|
|||
samples[0] = fromHex(samples[0]);
|
||||
samples[1] = fromHex(samples[1]);
|
||||
} else {
|
||||
samples[0] = Utils.strToByteArray(samples[0]);
|
||||
samples[1] = Utils.strToByteArray(samples[1]);
|
||||
samples[0] = new Uint8Array(Utils.strToArrayBuffer(samples[0]));
|
||||
samples[1] = new Uint8Array(Utils.strToArrayBuffer(samples[1]));
|
||||
}
|
||||
|
||||
let dist = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue