1
0

remove python implementation of ripemd160

This commit is contained in:
ThomasV
2016-01-26 15:18:28 +01:00
parent f0cb101326
commit 56c4a8746f
2 changed files with 3 additions and 409 deletions

View File

@@ -200,16 +200,9 @@ def i2o_ECPublicKey(pubkey, compressed=False):
############ functions from pywallet #####################
def hash_160(public_key):
try:
md = hashlib.new('ripemd160')
md.update(sha256(public_key))
return md.digest()
except Exception:
# not available in Android SL4a
import ripemd
md = ripemd.new(sha256(public_key))
return md.digest()
md = hashlib.new('ripemd160')
md.update(sha256(public_key))
return md.digest()
def public_key_to_bc_address(public_key):
h160 = hash_160(public_key)