Files
trading-journal/backend/trading_journal/security.py
Tianyu Liu 1fbc93353d
All checks were successful
Backend CI / unit-test (push) Successful in 35s
add exchange table
2025-09-22 14:33:32 +02:00

12 lines
272 B
Python

from passlib.context import CryptContext
pwd_ctx = CryptContext(schemes=["argon2"], deprecated="auto")
def hash_password(plain: str) -> str:
return pwd_ctx.hash(plain)
def verify_password(plain: str, hashed: str) -> bool:
return pwd_ctx.verify(plain, hashed)