import hashlib | |
import secrets | |
if __name__ == '__main__': | |
secret_hex = secrets.token_bytes(32).hex() | |
h_secret = hashlib.blake2b(secret_hex.encode('utf8'), 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