diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/js/index.js b/src/js/index.js index d356eb8..b03f2c8 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -764,7 +764,8 @@ | |||
764 | } | 764 | } |
765 | // Discard trailing entropy | 765 | // Discard trailing entropy |
766 | var bitsToUse = Math.floor(bits.length / 32) * 32; | 766 | var bitsToUse = Math.floor(bits.length / 32) * 32; |
767 | var binaryStr = bits.substring(0, bitsToUse); | 767 | var start = bits.length - bitsToUse; |
768 | var binaryStr = bits.substring(start); | ||
768 | // Convert entropy string to numeric array | 769 | // Convert entropy string to numeric array |
769 | var entropyArr = []; | 770 | var entropyArr = []; |
770 | for (var i=0; i<binaryStr.length / 8; i++) { | 771 | for (var i=0; i<binaryStr.length / 8; i++) { |