Operations on Python hashes
- by cdecker
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?