aboutsummaryrefslogtreecommitdiff
path: root/src/js/index.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2014-09-26 20:05:11 +1000
committerIan Coleman <coleman.ian@gmail.com>2014-09-26 20:05:56 +1000
commitbade150497a0459a8cb3b4a5cde315117b8430a7 (patch)
tree7cffde85028eec8f777b71ee40509dec8c6597e6 /src/js/index.js
parentd4779799ca468dcd7e99ebb0e1067a32a8435c03 (diff)
downloadBIP39-bade150497a0459a8cb3b4a5cde315117b8430a7.tar.gz
BIP39-bade150497a0459a8cb3b4a5cde315117b8430a7.tar.zst
BIP39-bade150497a0459a8cb3b4a5cde315117b8430a7.zip
bip32.org format not used for seed
ie put the bip39 seed directly into bip32 without hashing it first like bip32.org does with passphrases.
Diffstat (limited to 'src/js/index.js')
-rw-r--r--src/js/index.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/js/index.js b/src/js/index.js
index 7f39ad2..cd3a506 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -164,8 +164,7 @@
164 164
165 function calcBip32Seed(phrase, passphrase, path) { 165 function calcBip32Seed(phrase, passphrase, path) {
166 var seed = mnemonic.toSeed(phrase, passphrase); 166 var seed = mnemonic.toSeed(phrase, passphrase);
167 var seedHash = Bitcoin.crypto.sha256(seed).toString("hex"); 167 bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network);
168 bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network);
169 bip32ExtendedKey = bip32RootKey; 168 bip32ExtendedKey = bip32RootKey;
170 // Derive the key from the path 169 // Derive the key from the path
171 var pathBits = path.split("/"); 170 var pathBits = path.split("/");