Skip to content

x-compat/pypbkdf2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PBKDF2 implementation for Python [work in progress]

PBKDF2 (Password-Based Key Derivation Function 2) https://en.wikipedia.org/wiki/PBKDF2

pypbkdf2 CI

USAGE

Install

$ pip install py-pbkdf2
  • Hash a Password
import pypbkdf2

p = pypbkdf2.PyPBKDF2(salt_size=20)
res = p.hash_password('12345')
cipher_text = res[0]
salt = res[1]

# save this two into your Database
print(cipher_text)
print(salt)
  • Verify a Password
import pypbkdf2

p = pypbkdf2.PyPBKDF2(salt_size=20)
res = p.hash_password('12345')
cipher_text = res[0]
salt = res[1]

valid = p.verify_password('12345', cipher_text, salt)

print(valid) # True

x-compat 2021

About

PBKDF2 implementation for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published