Last active
June 2, 2023 01:14
-
-
Save ofelix03/bcd2621c7a7ada7900fbe56188b58048 to your computer and use it in GitHub Desktop.
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 | |
plaintext = "hello".encode() | |
d = hashlib.sha256(plaintext) | |
# generate binary hash of "hello" string | |
hash = d.digest() | |
print(hash) | |
# generate human readable hash of "hello" string | |
hash = d.hexdigest() | |
print(hash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment