some missing functions

This commit is contained in:
nxsofsys 2018-01-15 04:59:22 +03:00
parent 047901d3ed
commit 4aee7f2f19
1 changed files with 4 additions and 0 deletions

View File

@ -330,6 +330,10 @@ def Hash(x):
out = bytes(sha256(sha256(x)))
return out
hash_encode = lambda x: bh2u(x[::-1])
hash_decode = lambda x: bfh(x)[::-1]
hmac_sha_512 = lambda x, y: hmac.new(x, y, hashlib.sha512).digest()
def is_new_seed(x, prefix=version.SEED_PREFIX):
from . import mnemonic
x = mnemonic.normalize_text(x)