25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314
  1. # Hashing functions for passwords
  2. from passlib.context import CryptContext
  3. pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
  4. class Hasher:
  5. @staticmethod
  6. def verify_password(plain_password, hashed_password):
  7. return pwd_context.verify(plain_password, hashed_password)
  8. @staticmethod
  9. def get_password_hash(plain_password):
  10. return pwd_context.hash(plain_password)