Added new function for create random hashs
This commit is contained in:
parent
9dbfc8daeb
commit
59083cdd3a
2 changed files with 8 additions and 6 deletions
6
paramecio/citoplasma/keyutils.py
Normal file
6
paramecio/citoplasma/keyutils.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from hashlib import sha512
|
||||
from os import urandom
|
||||
|
||||
def create_key_encrypt(n=10):
|
||||
|
||||
return sha512(urandom(n)).hexdigest()
|
||||
|
|
@ -17,16 +17,12 @@ from importlib import import_module, reload
|
|||
from bottle import redirect
|
||||
from collections import OrderedDict
|
||||
from time import time
|
||||
from hashlib import sha512
|
||||
from os import urandom, path
|
||||
from paramecio.citoplasma.keyutils import create_key_encrypt
|
||||
from os import path
|
||||
|
||||
#from citoplasma.login import LoginClass
|
||||
# Check login
|
||||
|
||||
def create_key_encrypt():
|
||||
|
||||
return sha512(urandom(10)).hexdigest()
|
||||
|
||||
key_encrypt=create_key_encrypt()
|
||||
|
||||
module_admin=path.dirname(__file__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue