Instantly share code, notes, and snippets.

Embed
What would you like to do?
import hashlib
import secrets
if __name__ == '__main__':
secret = secrets.token_bytes(32)
h_secret = hashlib.blake2b(secret, digest_size=32)
print('Secret: \n{}\nHashed secret: \n{}'.format(secret.hex(), h_secret.hexdigest()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment