Skip to content

rahulunair/hashers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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