Files
notifications-api/app/hashing.py
2021-03-12 11:45:45 +00:00

11 lines
340 B
Python

from flask_bcrypt import check_password_hash, generate_password_hash
def hashpw(password):
return generate_password_hash(password.encode('UTF-8'), 10).decode('utf-8')
def check_hash(password, hashed_password):
# If salt is invalid throws a 500 should add try/catch here
return check_password_hash(hashed_password, password)