vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.3k stars 861 forks source link

Add pure python backup for ripemd160 w test. #15

Closed coder5876 closed 10 years ago

coder5876 commented 10 years ago

Cheers Vitalik, here is the pull request as we discussed over email. Adding the comments below for clarification.

I'm adding a pure python backup for ripemd160, in case the call to hashlib.new(''ripemd160") fails. This call will fail if the openssl library on the platform we're running on does not have the ripemd160 algorithm. The pure python implementation is not mine, the license is permissive but requires that the disclaimer be attached. I also added a test case to tests.py in the style of the other test cases.