Files
notifications-admin/app/main/encryption.py
Rebecca Law 7f96ef5a25 108536490: Initial effort to implement log in
Add endpoint for post to /sign-in
Initialise role data
2015-12-01 10:00:06 +00:00

8 lines
179 B
Python

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