Add spaces every 11 bits to raw binary of entropy

This makes it easier to see that the checksum is missing from the end of
the entropy.
This commit is contained in:
Ian Coleman
2018-03-12 10:22:26 +11:00
parent 048721a6ff
commit d6cade868f

View File

@@ -1225,13 +1225,14 @@
var entropyTypeStr = getEntropyTypeStr(entropy);
var wordCount = Math.floor(numberOfBits / 32) * 3;
var bitsPerEvent = entropy.bitsPerEvent.toFixed(2);
var spacedBinaryStr = entropy.binaryStr.match(/.{1,11}/g).join(" " );
DOM.entropyFiltered.html(entropy.cleanHtml);
DOM.entropyType.text(entropyTypeStr);
DOM.entropyCrackTime.text(timeToCrack);
DOM.entropyEventCount.text(entropy.base.ints.length);
DOM.entropyBits.text(numberOfBits);
DOM.entropyWordCount.text(wordCount);
DOM.entropyBinary.text(entropy.binaryStr);
DOM.entropyBinary.text(spacedBinaryStr);
DOM.entropyBitsPerEvent.text(bitsPerEvent);
// detect and warn of filtering
var rawNoSpaces = DOM.entropy.val().replace(/\s/g, "");