Awesome Open Source
Awesome Open Source

Hashers

A password encoding/hasing library for Python using Djangohashers Rust crate.

Installation

pip3 install hashers

Available APIs

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

Examples

>> 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")

Available algorithms:

  • Argon2
  • BCrypt
  • PBKDF2 (Default)
  • PBKDF2SHA1
  • BCryptSHA256

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,137,610
Rust (62,945
Password (1,639
Hashing (627
Bcrypt (466
Related Projects