PBKDF2 implementation for Python
Project description
PBKDF2 implementation for Python [work in progress]
PBKDF2 (Password-Based Key Derivation Function 2) https://en.wikipedia.org/wiki/PBKDF2
USAGE
Install
TODO
pip install ****
- 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
Doc
TODO
x-compat 2021
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-pbkdf2-1.0.0.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-pbkdf2-1.0.0.tar.gz.
File metadata
- Download URL: py-pbkdf2-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ab27acd7a733dbc2205f2b366a47744e4d5d8f511b737d5eb58969fd0a795a
|
|
| MD5 |
615a3f390ea636074f7877fec7bc2b8e
|
|
| BLAKE2b-256 |
2a405a35e6f38332434303fc0af46eb667acb1595bd041bc9f2d10f9d0e14942
|
File details
Details for the file py_pbkdf2-1.0.0-py3-none-any.whl.
File metadata
- Download URL: py_pbkdf2-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48cfc9fd3484222156725e8a218c1769d0bf044ca372acd62af896ae20fcb1e0
|
|
| MD5 |
69d4462641d84efd19a726785ed1e66a
|
|
| BLAKE2b-256 |
33e53a8fe298438a5ee1aa0f81d2a03845b3778b189b01679af111dce80c9e45
|