mirror of https://github.com/kianby/stacosys
parent
f9accbffef
commit
2d29502e5f
@ -0,0 +1,16 @@
|
|||||||
|
#!/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()
|
Loading…
Reference in New Issue