Search This Blog

Tuesday, July 7, 2009

Python Message Digest with hashlib

Python can produce hash number easily with MD5 and SHA

import hashlib
m = hashlib.md5()
m.update("digest this string!")
m.hexdigest()

9eb6401988dd30f9a792d7fc6ff7c898

What is hash collision?
Two messages with the same hash.

No comments: