Zdalne-systemy-z-kit-uVPN/utils.py
2023-04-13 11:52:51 +02:00

8 lines
188 B
Python

import hashlib
import secrets
def hash_password(password):
return hashlib.sha512(password.encode('utf-8')).hexdigest()
def generate_auth_token():
return secrets.token_urlsafe(32)