A password encoding/hasing library for Python using Djangohashers Rust crate.
pip3 install hashers
def hashpw(password: str, algorithm: str) -> str
def hashpw_with_salt(password: str, salt: str, algorithm: str) -> str
def chk_password(password: str, hashpw: str) -> bool
>> from hashers import hashpw, hashpw_with_salt, chk_password
>> encoded_pass_1 = hashpw("password123", "blake2")
>> encoded_pass_2 = hashpw_with_salt("password123", "sdpql", "blake2")
>> chk_password(encoded_pass_1, "password123")
- Argon2
- BCrypt
- PBKDF2 (Default)
- PBKDF2SHA1
- BCryptSHA256