Created
September 15, 2021 00:12
-
-
Save ofelix03/9b72be6bca93030c4253bcfbeecc8a84 to your computer and use it in GitHub Desktop.
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 os | |
import hashlib | |
salt = os.urandom(32) | |
plaintext = 'hellow0rld'.encode() | |
digest = hashlib.pbkdf2_hmac('sha256', plaintext, salt, 10000) | |
hex_hash = digest.hex() | |
print(hex_hash) | |
byte_hash = digest.fromhex(digest.hex()) | |
print(byte_hash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment