Last active
September 2, 2019 15:45
-
-
Save ross-humphrey/c1d7282f3b8f992ebe38bbd516aace0f to your computer and use it in GitHub Desktop.
🥢 Hasing using SHA-3 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
import hashlib | |
def sha_3_hex_digest(input_string): | |
""" | |
Given an input string a sha3 - 384 bit hex digest result | |
:param input_string: string to hash | |
:return: hexdigest string representation of input_string | |
""" | |
encoded_input = input_string.encode("utf-8") | |
return hashlib.sha3_384(encoded_input).hexdigest() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment