Secure Password library using only Python standard lib
Project description
A small Python library that aids in securely storing and authenticating passwords.
Based on best practice suggestions from: https://crackstation.net/hashing-security.htm?=rd
Usage
>>> hashed = hash_password( ... password='secure password', ... key='string from keyfile', ... iterations=500 ... ) >>> verify_password( ... stored_password=hashed, ... provided_password='secure password', ... key='string from keyfile', ... iterations=500 ... ) True
Note that iterations is a multiplied by 1,000. 500 is probably a reasonable default.
Keyed Hashes
If key is used it should be a string read from a file or outside source that is not stored in the database or hardcoded into the program.
Keyed Hashes are not required. By default an empty string is used.
See https://crackstation.net/hashing-security.htm?=rd for Keyed Hashes
Installation
poetry add sec-password
or
pip install sec-password
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
Built Distribution
File details
Details for the file sec-password-0.1.2.tar.gz
.
File metadata
- Download URL: sec-password-0.1.2.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7630-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aafae7cacbdb7608133e913e00c9801b1d9d5e01146f6645ad61e86cba964256 |
|
MD5 | 957c3a803cfdeb5045a7b218ea918497 |
|
BLAKE2b-256 | f58f73a3b46cfa9b47b1e027e95fdfe8c08eba962f65629a27d3d96c42722d55 |
File details
Details for the file sec_password-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: sec_password-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7630-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02e5b7e3636c8c96648bf8e223c2cdbdb7aa7adc8928861498e6b4360bd2ec8e |
|
MD5 | 990238878ee2094948c92049fac7f838 |
|
BLAKE2b-256 | 0af85963229c71a6a66d0d1f2e4a6376db7a09c77aa0c6c9d552ff46da31f64c |