|
|
@ -122,15 +122,11 @@ describe('BIP39', function() { |
|
|
|
}) |
|
|
|
|
|
|
|
describe('utf8 passwords', function() { |
|
|
|
vectors.japanese.forEach(function(v, i) { |
|
|
|
it ('creates the correct seed', function() { |
|
|
|
var mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" |
|
|
|
// Note that mocha does not support string normalization, so this
|
|
|
|
// fails if just the utf8_password is used. This is a mocha problem,
|
|
|
|
// not the library problem.
|
|
|
|
var utf8_password = "㍍ガバヴァぱばぐゞちぢ十人十色" |
|
|
|
var utf8_password_normalized = "メートルガバヴァぱばぐゞちぢ十人十色" |
|
|
|
var seed = "ba553eedefe76e67e2602dc20184c564010859faada929a090dd2c57aacb204ceefd15404ab50ef3e8dbeae5195aeae64b0def4d2eead1cdc728a33ced520ffd" |
|
|
|
assert.equal(BIP39.mnemonicToSeedHex(mnemonic, utf8_password_normalized), seed) |
|
|
|
var utf8_password = "㍍ガバヴァぱばぐゞちぢ十人十色" |
|
|
|
assert.equal(BIP39.mnemonicToSeedHex(v[1], utf8_password), v[2]) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|