https://github.com/sigmanificient/pbkdf2-reboot
An modernised `pbkdf2` module for python
https://github.com/sigmanificient/pbkdf2-reboot
hashing hashing-algorithm pbkdf2 pbkdf2-implementation python3
Last synced: 3 months ago
JSON representation
An modernised `pbkdf2` module for python
- Host: GitHub
- URL: https://github.com/sigmanificient/pbkdf2-reboot
- Owner: Sigmanificient
- Created: 2022-05-08T22:50:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-18T04:29:16.000Z (over 3 years ago)
- Last Synced: 2025-06-29T20:05:40.777Z (4 months ago)
- Topics: hashing, hashing-algorithm, pbkdf2, pbkdf2-implementation, python3
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PBKDF2 reboot
[](https://codecov.io/gh/Sigmanificient/pbkdf2-reboot)
A modern Python 3 library for PBKDF2 password hashing.
The library code is derived from the original Python 2 library [python-pbkdf2](https://github.com/dlitz/python-pbkdf2)
that hasn't been updated for 11 years.
The main purpose of this library is to provide a more in-time version with typing support.## Usage
```py
>>> from pbkdf2 import crypt
>>> pbkdf2.crypt('password', 'salt', iterations=1000)
'$p5k2$3e8$salt$8U24fPYH1KBtWqbN5ibra6gQR2ZV864RD1qpxeEVv/Q='
``````py
>>> from hashlib import sha3_512
>>> from pbkdf2 import PBKDF2
>>> p = PBKDF2('password', 'salt', iterations=1000, digest_module=sha3_512)
>>> p.read_hex(64)
'e697001cf40fe4623eb67df2ddab791a499451234957133097deffce766fc9839e4642de2a1cfea8307d98bde6995bab8cf70453dc8eab92fcba0a02a2ae026e'
```