rahulunair / hashers

Password hashing library in Python using Rust backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Password hashing library in Python using Rust backend

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Rust 75.3%Language:Python 24.7%