Skip to content

Instantly share code, notes, and snippets.

@GiovanniGrieco
Created November 10, 2018 23:21
Show Gist options
  • Save GiovanniGrieco/131e6319599c252e650c435a33f840b9 to your computer and use it in GitHub Desktop.
Save GiovanniGrieco/131e6319599c252e650c435a33f840b9 to your computer and use it in GitHub Desktop.
Calulate md5 hash (or any other hash supported by Python) of a given string quickly. For more information: https://docs.python.org/3.7/library/hashlib.html
import hashlib
in = b'My beautiful input string'
hashlib.md5(in).hexdigest()
# '0b78bf24d7128899723fb0e5cf7648b6'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment