backend/songbird/core/passwords.py
Rama main · réplica de lectura del repositorio original.
"""Argon2 password hashing (mirrors soap-journal). Auth is songbird's own domain."""
from passlib.context import CryptContext
_pwd_context = CryptContext(schemes=["argon2"], deprecated="auto")
def hash_password(plain: str) -> str:
return _pwd_context.hash(plain)
def verify_password(plain: str, hashed: str) -> bool:
return _pwd_context.verify(plain, hashed)