security.utils
Module for password utilities
Module Contents
Functions
|
Verifies password against a hash |
|
Returns a hash of the password |
Attributes
- security.utils.ALGORITHM = HS256
- security.utils.ACCESS_TOKEN_EXPIRE_MINUTES = 3000
- security.utils.pwd_context
- security.utils.verify_password(plain_password, hashed_password)
Verifies password against a hash
- Parameters
plain_password – password to verify
hashed_password – hash to verify against
- Returns
True if password matches, False otherwise
- security.utils.get_password_hash(password)
Returns a hash of the password
- Parameters
password – password to hash
- Returns
hashed password