Files
notifications-admin/app/main/encryption.py
Rebecca Law 48b7a7dc37 108536490: Adding the login manager and csrf token.
Still need to figure out how to override the load_user method, currently it is not working.
2015-12-01 10:00:06 +00:00

8 lines
184 B
Python

import hashlib
from flask import current_app
def encrypt(value):
key = current_app.config['PASS_SECRET_KEY']
return hashlib.sha256((key + value).encode('UTF-8')).hexdigest()