mirror of
https://github.com/gchq/CyberChef
synced 2025-12-23 11:43:39 +00:00
Improved performance of str/array buffer conversions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user