Skip to content

Instantly share code, notes, and snippets.

@halicki
Last active March 19, 2018 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halicki/16c6613310f6a5703ea625cde4352d87 to your computer and use it in GitHub Desktop.
Save halicki/16c6613310f6a5703ea625cde4352d87 to your computer and use it in GitHub Desktop.
sha1 your email
from hashlib import sha1
def hash_string(string_to_hash):
hasher = sha1()
bytes_string = string_to_hash.lower().strip().encode('utf-8')
hasher.update(bytes_string)
return hasher.hexdigest()
email = 'my_address@domain.com'
print(hash_string(email))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment