1
0

new seed_version: remove whitespaces only between CJK characters

This commit is contained in:
ThomasV
2014-09-13 19:31:05 +02:00
parent 1df007483e
commit cef75e9e7b
4 changed files with 59 additions and 17 deletions

View File

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