aboutsummaryrefslogtreecommitdiff
path: root/bip39-standalone.html
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2014-09-27 21:50:48 +1000
committerIan Coleman <coleman.ian@gmail.com>2014-09-27 21:50:48 +1000
commitbe6ba9a836bebfb245c0d139436e728296485e5e (patch)
treec19dfae080b2d0393ca62ca03898115255b7b035 /bip39-standalone.html
parent3f45abbf926973fa2f37ebba8e58ba2d9c25c8c8 (diff)
downloadBIP39-be6ba9a836bebfb245c0d139436e728296485e5e.tar.gz
BIP39-be6ba9a836bebfb245c0d139436e728296485e5e.tar.zst
BIP39-be6ba9a836bebfb245c0d139436e728296485e5e.zip
mnemonic.normalizeString method made public
Diffstat (limited to 'bip39-standalone.html')
-rw-r--r--bip39-standalone.html6
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 }