Files
CoPay/backend/app/core/security/hashing.py
T
2024-11-17 02:31:42 +03:00

12 lines
309 B
Python

import passlib.context
pwd_context = passlib.context.CryptContext(schemes=['bcrypt'])
def verify_password(plain_password: str, hashed_password: str) -> bool:
return pwd_context.verify(plain_password, hashed_password)
def get_password_hash(password: str) -> str:
return pwd_context.hash(password)