password - hashed passwords generation utility
The password module offers you a single utility class called Password. This class is meant to be used as an attribute of any other object class on which you want to store passwords in hashed mode. This module is framework-agnostic so it is up to you to provide persistence (you need to store ‘hash’ and ‘salt’ set on the object).
Example usage
Create your class:
>>> import password
>>> class User():
... password = password.Password(method='sha1', hash_encoding='base64')
# You also probably want to create 'hash' and 'salt' attributes
# With your chosen persistence mechanism
Set a password on the object:
>>> user = User() >>> user.password = 'abcdef'
You cannot read the password back:
>>> user.password <password._HashedPassword object at 0x7fdba1fef990>
but you can see, that hash and salt are set:
>>> user.hash 'L1Fz6aoIdIlZzoxsXPWxJq8zNTQ=' >>> user.salt 'VIboVvtr'
You can also check for equality with a string:
>>> user.password == 'abcdef' True >>> user.password == '12345' False
Metadata
Release files for password 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| password-0.2.zip | 3.8 kB | Without provenance | Details for password-0.2.zip | |
| password-0.2.tar.bz2 | 2.5 kB | Without provenance | Details for password-0.2.tar.bz2 |
Release files / password-0.2.zip
| Download URL | password-0.2.zip |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1502353c1c5c0541c0625b4f71255eb1b06e72b8146963a08ea3aa340c0bf53
|
|
BLAKE2b-256 checksum How to use checksums |
81a34e83ff416b1d544da276a0a95ce469c0ec7b28f68a68cf61c9a987dda134
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / password-0.2.tar.bz2
| Download URL | password-0.2.tar.bz2 |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ad8ed238c0c3f929778bc82237ecfd333a1b7357b5864bce7d7b5cd2b039b19
|
|
BLAKE2b-256 checksum How to use checksums |
293ebeaeac8ff2c014630ca99ee3ae0d4179c08407f50215aac2377323436b52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for password 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.