Here's the code I tried in Python but I get AttributeError:
>>> import hmac
>>> import hashlib
>>> h=hashlib.new('ripemd160')
>>> hmac.new("bedford","Hello",hashlib.ripemd160)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'hashlib' has no attribute 'ripemd160'
I have searched the Python documentation and lots of forums but do not find much on ripemd160 and Python.
ripemd160is not supported directly by thehashlibmodule:The following are supported by the module:
md5, sha1, sha224, sha256, sha384, sha512So you need to use the
newconstructor again or pass the reference to the one you already created.