mirror of https://github.com/status-im/bip39.git
need to normalize mnemonics too
This commit is contained in:
parent
638a78c681
commit
6514707eac
2
index.js
2
index.js
|
@ -8,7 +8,7 @@ var DEFAULT_WORDLIST = require('./wordlists/en.json')
|
|||
var JAPANESE_WORDLIST = require('./wordlists/ja.json')
|
||||
|
||||
function mnemonicToSeed(mnemonic, password) {
|
||||
var mnemonicBuffer = new Buffer(mnemonic, 'utf8')
|
||||
var mnemonicBuffer = new Buffer(unorm.nfkd(mnemonic), 'utf8')
|
||||
var saltBuffer = new Buffer(salt(password), 'utf8')
|
||||
|
||||
return pbkdf2(mnemonicBuffer, saltBuffer, 2048, 64, 'sha512')
|
||||
|
|
Loading…
Reference in New Issue