If the entropy of the output is higher than the entropy of the input then the branch will return

This commit is contained in:
n1073645 2019-12-11 10:03:31 +00:00
parent 8c3d3a3d94
commit d29f6efad8

View file

@ -308,8 +308,8 @@ class Magic {
let outputEntropy = 0; let outputEntropy = 0;
if (entropyTests) { if (entropyTests) {
outputEntropy = this.calcEntropy(new Uint8Array(output)); outputEntropy = this.calcEntropy(new Uint8Array(output));
console.log(entropyTests.output); if (inputEntropy < outputEntropy)
console.log(outputEntropy); return;
} }
const outputRegexes = OperationConfig[op.op].outputRegexes; const outputRegexes = OperationConfig[op.op].outputRegexes;