def bin_hash160(string): intermed = hashlib.sha256(string).digest() digest = '' try: digest = hashlib.new('ripemd160',intermed).digest() except: digest = ripemd.RIPEMD160(intermed).digest() return digest
def bin_ripemd160(string): try: digest = hashlib.new('ripemd160', string).digest() except: digest = ripemd.RIPEMD160(string).digest() return digest