2015-11-27 09:47:29 +00:00
|
|
|
import hashlib
|
|
|
|
|
from flask import current_app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def encrypt(value):
|
2015-11-27 16:25:56 +00:00
|
|
|
key = current_app.config['PASS_SECRET_KEY']
|
2015-11-27 09:47:29 +00:00
|
|
|
return hashlib.sha256((key + value).encode('UTF-8')).hexdigest()
|