Configuration moved to JSON and validated by JSON Schema

This commit is contained in:
Yax 2018-01-20 08:57:49 +01:00
parent 47bda266a4
commit 8ebed3cda6
21 changed files with 300 additions and 103 deletions

View file

@ -2,11 +2,11 @@
# -*- coding: UTF-8 -*-
import hashlib
import config
from conf import config
def salt(value):
string = '%s%s' % (value, config.SALT)
string = '%s%s' % (value, config.security['salt'])
dk = hashlib.sha256(string.encode())
return dk.hexdigest()