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
Hashes for sec_password-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f1c897e43c263aa96feb76781919249888d3753b9d92dbc323cc447f8bcb98 |
|
MD5 | d80402fed1d341109bfcbd6843332d12 |
|
BLAKE2b-256 | ec81b9620bb190a45a83911aa63142a9f2c00417ca16f345028212582228e64a |