Password strength calculator in Python
Project description
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}}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file passwordstrength-0.2.4.tar.gz.
File metadata
- Download URL: passwordstrength-0.2.4.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba22dabc7acf1b93905794713a7a88d38484dcc8ae305bc60118d56348ba08a5
|
|
| MD5 |
de44bac2aefe850013ba066cd06d2dec
|
|
| BLAKE2b-256 |
091c08a000898405216da58522ab3589015b30b3824bb54e1b2ec448d66d787c
|
File details
Details for the file passwordstrength-0.2.4-py3-none-any.whl.
File metadata
- Download URL: passwordstrength-0.2.4-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c64edb1a53cd19d25d592a30cf7f97f643de156c199b80e48922c5276d468fd
|
|
| MD5 |
d01692b36fbaa57e6159918335ef6226
|
|
| BLAKE2b-256 |
064f1d8325f8f8db47acdd794d83eb4b095ead1894e4575780d57a125ec69d56
|