authsquare/app/scripts/saltedkey.py

6 lines
145 B
Python
Raw Normal View History

2024-06-17 17:31:07 +07:00
import bcrypt
import hashlib
def token(username, hashed):
return hashlib.sha1( (username+username[:3]+hashed[-6:]).encode() ).hexdigest()