Added new function for create random hashs

This commit is contained in:
Antonio de la Rosa 2015-12-14 17:31:09 +01:00
parent 9dbfc8daeb
commit 59083cdd3a
2 changed files with 8 additions and 6 deletions

View file

@ -0,0 +1,6 @@
from hashlib import sha512
from os import urandom
def create_key_encrypt(n=10):
return sha512(urandom(n)).hexdigest()