Created
May 27, 2013 05:17
-
-
Save johnsmith17th/5655288 to your computer and use it in GitHub Desktop.
make md5 in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import md5 | |
def digest(text): | |
h = md5() | |
h.update(text.encode('utf-8')) | |
return h.hexdigest().upper() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment