Finalize migration tool.
Retrieve comments by GET and POST
This commit is contained in:
parent
4c4ee442d3
commit
612fb85fa3
5 changed files with 53 additions and 27 deletions
16
app/helpers/hashing.py
Normal file
16
app/helpers/hashing.py
Normal file
|
|
@ -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…
Add table
Add a link
Reference in a new issue