Download the PHP package niirrty/niirrty.security.password without Composer
On this page you can find all versions of the php package niirrty/niirrty.security.password. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download niirrty/niirrty.security.password
More information about niirrty/niirrty.security.password
Files in niirrty/niirrty.security.password
Package niirrty.security.password
Short Description A little password-security library
License MIT
Informations about the package niirrty.security.password
Niirrty.Security.Password
A little password-security library.
It defines only a single class Niirrty\Security\Password\PasswordSecurityCheck
that can be used to check the
quality of a password.
Installation
Its a composer package, so you can install it by composer
or inside the composer.json
How it works?
It generates 4 different password quality indicators:
- Password Length: Max quality can be reached by using 11 or more characters
- Character diversity: The quality in relation to how many different chars are used
- Character type diversity: The quality in relation to how many different char types are used (letters-lower, letters-upper, numbers, other)
- Known by Top lists: 1 if known by Top 10 password lists, 2 if known by Top 25 password lists and 5 if known by Top 50 password lists, otherwise 10
The check, if a password is inside a password list Top 10/25/50 uses a SQLite DB in Background. The DB defines all unique Top10, Top25 and Top50 passwords, extracted from SecLists password files, excluding spanish and not *.txt files.
Each uses a value between 0 (no security) and 10 (max security)
The lowest value of the 4 indicators will be returned by ->getQuality()
The password self is not stored inside a class instance.
Usage
This is a simple usage example:
will output:
Used abbr. above are:
- LenQ : Password length quality
- DivQ : Character diversity quality
- DivTQ: Character type diversity quality
- TopQ : Known by Top lists quality