authsquare/app/scripts/saltedkey.py
2024-06-17 17:31:07 +07:00

6 lines
145 B
Python

import bcrypt
import hashlib
def token(username, hashed):
return hashlib.sha1( (username+username[:3]+hashed[-6:]).encode() ).hexdigest()