Last active
March 19, 2018 16:00
-
-
Save halicki/16c6613310f6a5703ea625cde4352d87 to your computer and use it in GitHub Desktop.
sha1 your email
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 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 = '[email protected]' | |
print(hash_string(email)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment