def hex_digest(s): m = md5() m.update(s) return string.joinfields( map(lambda x: hex(ord(x))[2:], map(None, m.digest())), '', )