WIP
This commit is contained in:
parent
3c4a25e5ad
commit
6867e71d7c
11 changed files with 185 additions and 177 deletions
16
app/helper/hashing.py
Normal file
16
app/helper/hashing.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import hashlib
|
||||
from conf import config
|
||||
|
||||
|
||||
def salt(value):
|
||||
string = "%s%s" % (value, config.get(config.SECURITY_SALT))
|
||||
dk = hashlib.sha256(string.encode())
|
||||
return dk.hexdigest()
|
||||
|
||||
|
||||
def md5(value):
|
||||
dk = hashlib.md5(value.encode())
|
||||
return dk.hexdigest()
|
||||
Loading…
Add table
Add a link
Reference in a new issue