diff options
Diffstat (limited to 'bip39-standalone.html')
-rw-r--r-- | bip39-standalone.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bip39-standalone.html b/bip39-standalone.html index 41634c2..b062b2e 100644 --- a/bip39-standalone.html +++ b/bip39-standalone.html | |||
@@ -22432,14 +22432,14 @@ var Mnemonic = function(language) { | |||
22432 | 22432 | ||
22433 | self.toSeed = function(mnemonic, passphrase) { | 22433 | self.toSeed = function(mnemonic, passphrase) { |
22434 | passphrase = passphrase || ''; | 22434 | passphrase = passphrase || ''; |
22435 | mnemonic = normalizeString(mnemonic) | 22435 | mnemonic = self.normalizeString(mnemonic) |
22436 | passphrase = normalizeString(passphrase) | 22436 | passphrase = self.normalizeString(passphrase) |
22437 | passphrase = "mnemonic" + passphrase; | 22437 | passphrase = "mnemonic" + passphrase; |
22438 | //return PBKDF2(mnemonic, 'mnemonic' + passphrase, iterations=PBKDF2_ROUNDS, macmodule=hmac, digestmodule=hashlib.sha512).read(64) | 22438 | //return PBKDF2(mnemonic, 'mnemonic' + passphrase, iterations=PBKDF2_ROUNDS, macmodule=hmac, digestmodule=hashlib.sha512).read(64) |
22439 | return asmCrypto.PBKDF2_HMAC_SHA512.hex(mnemonic, passphrase, PBKDF2_ROUNDS, 512/8); | 22439 | return asmCrypto.PBKDF2_HMAC_SHA512.hex(mnemonic, passphrase, PBKDF2_ROUNDS, 512/8); |
22440 | } | 22440 | } |
22441 | 22441 | ||
22442 | function normalizeString(str) { | 22442 | self.normalizeString = function(str) { |
22443 | if (typeof str.normalize == "function") { | 22443 | if (typeof str.normalize == "function") { |
22444 | return str.normalize("NFKD"); | 22444 | return str.normalize("NFKD"); |
22445 | } | 22445 | } |