1
0

changes for new toolchain

This commit is contained in:
ThomasV
2016-06-16 09:48:30 +02:00
parent 07c5f02639
commit 67780bb8b9
2 changed files with 7 additions and 4 deletions

View File

@@ -26,6 +26,7 @@
import hashlib
import base64
import os
import re
import hmac
@@ -208,9 +209,11 @@ def i2o_ECPublicKey(pubkey, compressed=False):
############ functions from pywallet #####################
def hash_160(public_key):
#md = hashlib.new('ripemd')
from Crypto.Hash import RIPEMD
md = RIPEMD.new()
if 'ANDROID_DATA' in os.environ:
from Crypto.Hash import RIPEMD
md = RIPEMD.new()
else:
md = hashlib.new('ripemd')
md.update(sha256(public_key))
return md.digest()