Address #1728
This commit is contained in:
parent
950bcd0f6d
commit
2c06492407
|
@ -292,7 +292,7 @@ proc init*(T: type KeystorePass, input: string): T =
|
||||||
|
|
||||||
func getSeed*(mnemonic: Mnemonic, password: KeystorePass): KeySeed =
|
func getSeed*(mnemonic: Mnemonic, password: KeystorePass): KeySeed =
|
||||||
# https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#from-mnemonic-to-seed
|
# https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#from-mnemonic-to-seed
|
||||||
let salt = "mnemonic-" & password.str
|
let salt = toNFKD("mnemonic" & password.str)
|
||||||
KeySeed sha512.pbkdf2(mnemonic.string, salt, 2048, 64)
|
KeySeed sha512.pbkdf2(mnemonic.string, salt, 2048, 64)
|
||||||
|
|
||||||
template add(m: var Mnemonic, s: cstring) =
|
template add(m: var Mnemonic, s: cstring) =
|
||||||
|
|
Loading…
Reference in New Issue