Skip to content

Instantly share code, notes, and snippets.

@Oxygenesis
Created October 16, 2023 14:58
Show Gist options
  • Save Oxygenesis/f5c46b2628fab18cb9da11c0b066d970 to your computer and use it in GitHub Desktop.
Save Oxygenesis/f5c46b2628fab18cb9da11c0b066d970 to your computer and use it in GitHub Desktop.
Digest mozilla implementation in python
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