agossou / password-level
Check password security level
Requires
- php: >=4.3.0
README
Description
Checks password level security, generate secure password.
Feats:
(1)- Password security level checking
Returns a value between 0 and 6. The minimum level is 1 if the password contains 8 characters. The level increases according to the combinations of upper case characters, lower case characters, numbers and symbols in addition to the length of the string. Level 6 is extremely secure.
(2)- Secure password generation
Compatibility
This library requires PHP v4.3 or higher.
Installation
Use the below code to install the wrapper:
composer require agossou/password-level
If you are not using Composer, clone or download this repository that already contains the vendor/autoload.php
file. If you encounter an issue, please post it here and not on the mirror repository.
Using Password Level in your project
<?php // check password security level use Agossou\PasswordLevel\PasswordLevel; $password = 'given password'; $level = PasswordLevel::checkLevel($password); or $level = \Agossou\PasswordLevel\PasswordLevel::checkLevel($password); // generate secure password use Agossou\PasswordLevel\SecurePassword; $secure_password = SecurePassword::generate(); or $secure_password = \Agossou\PasswordLevel\SecurePassword::generate();