PasswordStrength
Editable password strength calculator for Python.
Update: Add entropy module!
Entropy
This calculates the ability to tolerate dictionary attack. Probably, an entropy of 2**70 is eventually needed.
>>> from passwordstrength.entropy import Entropy
>>> import math
>>> entropy = Entropy()
>>> math.log2(entropy.entropy('asdhaskj'))
39.603517745128734
>>> math.log2(entropy.entropy('hello'))
11.240195053979924
>>> math.log2(entropy.entropy('helloworld'))
49.00439718141092
>>> math.log2(entropy.entropy('@sdhaskj'))
41.54693421676237
>>> math.log2(entropy.entropy('@sQsA$!j'))
48.43376716002963
Password Meter
This is based on http://www.passwordmeter.com
Usage
>>> from passwordstrength.passwordmeter import PasswordStrength
>>> strength = PasswordStrength('password')
>>> strength.strength()
9
>>> strength.rule_scores()
{'Additions': {'nAlphaLCBonus': 0,
'nAlphaUCBonus': 0,
'nLengthBonus': 32,
'nMidCharBonus': 0,
'nNumberBonus': 0,
'nSymbolBonus': 0},
'Deductions': {'nAlphasOnlyBonus': 8,
'nConsecAlphaLCBonus': 14,
'nConsecAlphaUCBonus': 0,
'nConsecNumberBonus': 0,
'nNumbersOnlyBonus': 0,
'nRepCharBonus': 1,
'nSeqAlphaBonus': 0,
'nSeqNumberBonus': 0,
'nSeqSymbolBonus': 0}}
Metadata
Release files for passwordstrength 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| passwordstrength-0.2.4.tar.gz | 5.0 kB | Without provenance | Details for passwordstrength-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| passwordstrength-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for passwordstrength-0.2.4-py3-none-any.whl |
Total release size: 1.5 MB
Release files / passwordstrength-0.2.4.tar.gz
| Download URL | passwordstrength-0.2.4.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba22dabc7acf1b93905794713a7a88d38484dcc8ae305bc60118d56348ba08a5
|
|
BLAKE2b-256 checksum How to use checksums |
091c08a000898405216da58522ab3589015b30b3824bb54e1b2ec448d66d787c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / passwordstrength-0.2.4-py3-none-any.whl
| Download URL | passwordstrength-0.2.4-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c64edb1a53cd19d25d592a30cf7f97f643de156c199b80e48922c5276d468fd
|
|
BLAKE2b-256 checksum How to use checksums |
064f1d8325f8f8db47acdd794d83eb4b095ead1894e4575780d57a125ec69d56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for passwordstrength 0.2.4
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.