Created
March 12, 2024 14:35
-
-
Save tejas-kr/930e69aee4815e23c6bc7376ac0b5b58 to your computer and use it in GitHub Desktop.
Snippet to hash passwords
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 | |
hashed_str1 = hashlib.sha256('text123hello'.encode('utf-8')).hexdigest() | |
print(hashed_str1) | |
hashed_str2 = hashlib.sha256('text123hello'.encode('utf-8')).hexdigest() | |
print(hashed_str2) | |
assert hashed_str1 == hashed_str2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment