From d6cade868f67c10da6fcf20e51643439e9d3be77 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Mon, 12 Mar 2018 10:22:26 +1100 Subject: [PATCH] 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. --- src/js/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/index.js b/src/js/index.js index 1707b16..b36e992 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -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, ""); -- 2.41.0