1
0

normalize passphrase

This commit is contained in:
ThomasV
2016-09-02 10:20:04 +02:00
parent cba9a2dc2c
commit 1e4cdab096
3 changed files with 4 additions and 4 deletions

View File

@@ -160,7 +160,7 @@ hmac_sha_512 = lambda x,y: hmac.new(x, y, hashlib.sha512).digest()
def is_new_seed(x, prefix=version.SEED_PREFIX):
import mnemonic
x = mnemonic.prepare_seed(x)
x = mnemonic.normalize_text(x)
s = hmac_sha_512("Seed version", x.encode('utf8')).encode('hex')
return s.startswith(prefix)