Skip to content

Instantly share code, notes, and snippets.

@tejas-kr
Created March 12, 2024 14:35
Show Gist options
  • Save tejas-kr/930e69aee4815e23c6bc7376ac0b5b58 to your computer and use it in GitHub Desktop.
Save tejas-kr/930e69aee4815e23c6bc7376ac0b5b58 to your computer and use it in GitHub Desktop.
Snippet to hash passwords
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