mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Backend Refactor
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#-*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Hashing and salting
|
||||
"""
|
||||
|
||||
from base64 import urlsafe_b64encode
|
||||
from hashlib import pbkdf2_hmac
|
||||
from secrets import token_bytes
|
||||
@@ -29,7 +33,6 @@ def generate_salt_hash(password: str) -> Tuple[bytes, bytes]:
|
||||
Returns:
|
||||
Tuple[bytes, bytes]: The salt (1) and hashed_password (2)
|
||||
"""
|
||||
# Hash the password
|
||||
salt = token_bytes()
|
||||
hashed_password = get_hash(salt, password)
|
||||
del password
|
||||
|
||||
Reference in New Issue
Block a user