stacosys/app/helpers/hashing.py
Yax 612fb85fa3 Finalize migration tool.
Retrieve comments by GET and POST
2015-05-03 18:31:15 +02:00

16 lines
282 B
Python

#!/usr/bin/python
# -*- coding: UTF-8 -*-
import hashlib
import config
def salt(value):
string = '%s%s' % (value, config.SALT)
dk = hashlib.sha256(string.encode())
return dk.hexdigest()
def md5(value):
dk = hashlib.md5(value.encode())
return dk.hexdigest()