This commit is contained in:
2023-09-11 17:30:47 -03:00
parent 4ebf1edfe2
commit 9fafd82b5c
3 changed files with 76 additions and 27 deletions
+7
View File
@@ -0,0 +1,7 @@
from hashlib import sha256
import time
# password = hashed password
def generate_token(password, salt):
time = time.strftime('%d%m%Y%H%M')
token = sha256((password + salt + time).encode('utf-8')).hexdigest()