Files
vpn/app/security.py
T
test2andCursor bbff3cb10b first commit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 20:36:00 +03:00

12 lines
310 B
Python

from passlib.context import CryptContext
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
def hash_password(password: str) -> str:
return pwd_context.hash(password)
def verify_password(password: str, password_hash: str) -> bool:
return pwd_context.verify(password, password_hash)