mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-17 10:42:25 -05:00
11 lines
328 B
Python
11 lines
328 B
Python
|
|
from flask.ext.bcrypt import generate_password_hash, check_password_hash
|
||
|
|
|
||
|
|
|
||
|
|
def hashpw(password):
|
||
|
|
return generate_password_hash(password.encode('UTF-8'), 10)
|
||
|
|
|
||
|
|
|
||
|
|
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)
|