Spaces:
Sleeping
Sleeping
some updates
Browse files
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
server.py
CHANGED
|
@@ -124,13 +124,13 @@ def normalize_email(email: str) -> str:
|
|
| 124 |
|
| 125 |
def get_password_hash(password: str) -> str:
|
| 126 |
# Hash password with SHA256 first to handle any length, then use bcrypt
|
| 127 |
-
password_hash = hashlib.sha256(password.encode('utf-8')).
|
| 128 |
return pwd_context.hash(password_hash)
|
| 129 |
|
| 130 |
|
| 131 |
def verify_password(plain_password: str, hashed_password: str) -> bool:
|
| 132 |
# Apply same SHA256 transformation before verifying
|
| 133 |
-
password_hash = hashlib.sha256(plain_password.encode('utf-8')).
|
| 134 |
return pwd_context.verify(password_hash, hashed_password)
|
| 135 |
|
| 136 |
|
|
|
|
| 124 |
|
| 125 |
def get_password_hash(password: str) -> str:
|
| 126 |
# Hash password with SHA256 first to handle any length, then use bcrypt
|
| 127 |
+
password_hash = hashlib.sha256(password.encode('utf-8')).digest()
|
| 128 |
return pwd_context.hash(password_hash)
|
| 129 |
|
| 130 |
|
| 131 |
def verify_password(plain_password: str, hashed_password: str) -> bool:
|
| 132 |
# Apply same SHA256 transformation before verifying
|
| 133 |
+
password_hash = hashlib.sha256(plain_password.encode('utf-8')).digest()
|
| 134 |
return pwd_context.verify(password_hash, hashed_password)
|
| 135 |
|
| 136 |
|