9 lines
207 B
Python
9 lines
207 B
Python
import hashlib
|
|
|
|
|
|
def salted_hash_userid(user_id: int):
|
|
SALT = b"Lt2N5xgjJOqRsT5qVt7wWYw6SqOPZDI7"
|
|
|
|
hash_uid = hashlib.sha256(f"{user_id}".encode("utf-8") + SALT)
|
|
return hash_uid.hexdigest()[:16]
|