Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from passlib.context import CryptContext
- pwd_context = CryptContext(
- schemes=["pbkdf2_sha256"],
- default="pbkdf2_sha256",
- pbkdf2_sha256__default_rounds=30000
- )
- def encrypt_password(password):
- return pwd_context.encrypt(password)
- def check_encrypted_password(password, hashed):
- return pwd_context.verify(password, hashed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement