Created
October 16, 2023 14:58
-
-
Save Oxygenesis/f5c46b2628fab18cb9da11c0b066d970 to your computer and use it in GitHub Desktop.
Digest mozilla implementation in python
This file contains 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 main(): | |
data = "data" | |
result = default_digest(data) | |
print("Default Digest:", result) | |
def default_digest(data): | |
hash_object = hashlib.sha256(data.encode()) | |
return hash_object.hexdigest() | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment