Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Maxl94_yaai /yaai /server /auth /passwords.py
| """Password hashing utilities using bcrypt.""" | |
| import bcrypt | |
| def hash_password(password: str) -> str: | |
| """Hash a plaintext password using bcrypt.""" | |
| return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode() | |
| def verify_password(plain: str, hashed: str) -> bool: | |
| """Verify a plaintext password against a bcrypt hash.""" | |
| return bcrypt.checkpw(plain.encode(), hashed.encode()) | |
Xet Storage Details
- Size:
- 402 Bytes
- Xet hash:
- 398b827302b6298efe7ba868cda8e3c76d12281b85eda265ee9a99d303e1a117
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.