Zdalne-systemy-z-kit-uVPN/utils.py

8 lines
188 B
Python
Raw Normal View History

2023-04-13 09:52:51 +00:00
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)