Python Hashlib And Ripemd160

Home » CentOS » Python Hashlib And Ripemd160
CentOS 4 Comments

Hi – I think the patent monster has struck again.

rmd = hashlib.new(‘ripemd160’,binascii.unhexlify(someString)).hexdigest()

That fails – ValueError: unsupported hash type

From some googling, it appears that the supported hash types are from OpenSSL and that means the OpenSSL in CentOS doesn’t support ripemd160.

I’ve worked around other stuff missing from CentOS OpenSSL by building LibreSSL and linking against that but python is central to the operation of CentOS and I do not want to mess with replacing the CentOS packaging of python.

Is there an alternate way to get a ripemd160 hash in python on CentOS ?

4 thoughts on - Python Hashlib And Ripemd160

  • well, how about compiling instance to another directory like
    /opt/python-alternative?

    usually works like ./configure –prefix=/opt/python-alternative and then other normal stuff..

  • okay it appears there are no suspect patent issues with ripemd160 so either they just didn’t include it for some other reason or the issue is elsewhere.