Popularity
5.2
Declining
Activity
0.0
Declining
553
23
65

Description

Zxcvbn-PHP is a password strength estimator using pattern matching and minimum entropy calculation. Zxcvbn-PHP is based on the Javascript zxcvbn project from Dropbox and @lowe. "zxcvbn" is bad password, just like "qwerty" and "123456".

Code Quality Rank: L4
Monthly Downloads: 33,999
Programming language: PHP
License: MIT License
Tags: Passwords     Password     Zxcvbn    
Latest version: v0.4.0

Zxcvbn PHP alternatives and similar libraries

Based on the "Passwords" category

Do you think we are missing an alternative of Zxcvbn PHP or a related project?

Add another 'Passwords' Library

README

Zxcvbn-PHP is a password strength estimator using pattern matching and minimum entropy calculation. Zxcvbn-PHP is based on the the Javascript zxcvbn project from Dropbox and @lowe. "zxcvbn" is bad password, just like "qwerty" and "123456".

zxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.

Build Status Coverage Status Latest Stable Version

Installation

The library can be installed with Composer by adding it as a dependency to your composer.json file.

{
    "require": {
        "bjeavons/zxcvbn-php": "^0.4"
    }
}

After running php composer.phar update on the command line, include the autoloader in your PHP scripts so that the ZxcvbnPhp class is available.

require_once 'vendor/autoload.php';

Usage

use ZxcvbnPhp\Zxcvbn;

$userData = [
  'Marco',
  'marco@example.com'
];

$zxcvbn = new Zxcvbn();
$strength = $zxcvbn->passwordStrength('password', $userData);
echo $strength['score'];
// will print 0

$strength = $zxcvbn->passwordStrength('correct horse battery staple');
echo $strength['score'];
// will print 4

Acknowledgements

Thanks to @lowe for the original Javascript Zxcvbn and @Dreyer's port for reference.