diff options
author | Chris Moore <dooglus@gmail.com> | 2016-03-19 13:39:42 -0700 |
---|---|---|
committer | Chris Moore <dooglus@gmail.com> | 2016-03-19 13:39:42 -0700 |
commit | 7772c641c7f2537246ff268bee725debe52edfd9 (patch) | |
tree | 17cbc4c78e7e6cd63f1c21baf4b3eee6beddbc00 /bip39-standalone.html | |
parent | 18531979e830c8c094e8de0b3ee593eebd250807 (diff) | |
download | BIP39-7772c641c7f2537246ff268bee725debe52edfd9.tar.gz BIP39-7772c641c7f2537246ff268bee725debe52edfd9.tar.zst BIP39-7772c641c7f2537246ff268bee725debe52edfd9.zip |
Normalize whitespace before using mnemonic. Fixes #19.
Diffstat (limited to 'bip39-standalone.html')
-rw-r--r-- | bip39-standalone.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index 28f0a55..370a5ff 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -14520,7 +14520,7 @@ var Mnemonic = function(language) { | |||
14520 | 14520 | ||
14521 | self.toSeed = function(mnemonic, passphrase) { | 14521 | self.toSeed = function(mnemonic, passphrase) { |
14522 | passphrase = passphrase || ''; | 14522 | passphrase = passphrase || ''; |
14523 | mnemonic = self.normalizeString(mnemonic) | 14523 | mnemonic = self.normalizeString(mnemonic).split(' ').filter(function(x) { return x.length; }).join(' '); |
14524 | passphrase = self.normalizeString(passphrase) | 14524 | passphrase = self.normalizeString(passphrase) |
14525 | passphrase = "mnemonic" + passphrase; | 14525 | passphrase = "mnemonic" + passphrase; |
14526 | var mnemonicBits = sjcl.codec.utf8String.toBits(mnemonic); | 14526 | var mnemonicBits = sjcl.codec.utf8String.toBits(mnemonic); |