Skip to main content

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:


>>> 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
... )

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 for Keyed Hashes


poetry add sec-password


pip install sec-password

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sec-password-0.1.2.tar.gz (2.1 kB view hashes)

Uploaded source

Built Distribution

sec_password-0.1.2-py3-none-any.whl (2.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page