Operations on Python hashes

Posted by cdecker on Stack Overflow See other posts from Stack Overflow or by cdecker
Published on 2010-04-24T00:49:12Z Indexed on 2010/04/24 0:53 UTC
Read the original article Hit count: 382

Filed under:
|
|
|
|

I've got a rather strange problem. For a Distributed Hash Table I need to be able to do some simple math operations on MD5 hashes. These include a sum (numeric sum represented by the hash) and a modulo operation. Now I'm wondering what the best way to implement these operations is. I'm using hashlib to calculate the hashes, but since the hashes I get are then string, how do I calculate with them?

© Stack Overflow or respective owner

Related posts about python

Related posts about dht