mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Fixed minor errors
This commit is contained in:
parent
08a31523b2
commit
4ca2a30249
2 changed files with 4 additions and 4 deletions
|
@ -3190,9 +3190,9 @@ const OperationConfig = {
|
||||||
module: "Default",
|
module: "Default",
|
||||||
description: "Calculates the Chi Square distribution of values.",
|
description: "Calculates the Chi Square distribution of values.",
|
||||||
inputType: "byteArray",
|
inputType: "byteArray",
|
||||||
outputType: "",
|
outputType: "number",
|
||||||
args: []
|
args: []
|
||||||
}
|
},
|
||||||
"Numberwang": {
|
"Numberwang": {
|
||||||
module: "Default",
|
module: "Default",
|
||||||
description: "Based on the popular gameshow by Mitchell and Webb.",
|
description: "Based on the popular gameshow by Mitchell and Webb.",
|
||||||
|
|
|
@ -176,7 +176,7 @@ const Entropy = {
|
||||||
let distArray = new Array(256).fill(0),
|
let distArray = new Array(256).fill(0),
|
||||||
total = 0;
|
total = 0;
|
||||||
for (let i = 0; i < input.length; i++) {
|
for (let i = 0; i < input.length; i++) {
|
||||||
distArray[data[i]]++;
|
distArray[input[i]]++;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < distArray.length; i++) {
|
for (let i = 0; i < distArray.length; i++) {
|
||||||
if (distArray[i] > 0) {
|
if (distArray[i] > 0) {
|
||||||
|
@ -184,7 +184,7 @@ const Entropy = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Entropy;
|
export default Entropy;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue