2017 © Pedro Peláez
 

library zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

image

bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  • Monday, July 23, 2018
  • by bjeavons
  • Repository
  • 23 Watchers
  • 453 Stars
  • 379,605 Installations
  • PHP
  • 26 Dependents
  • 1 Suggesters
  • 51 Forks
  • 11 Open issues
  • 9 Versions
  • 15 % Grown

The README.md

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"., (*1)

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., (*2)

Build Status Coverage Status Latest Stable Version License, (*3)

Installation

The library can be installed with Composer by adding it as a dependency to your composer.json file., (*4)

Via the command line run: composer require bjeavons/zxcvbn-php, (*5)

Or in your composer.json add, (*6)

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

Then run composer update on the command line and include the autoloader in your PHP scripts so that the ZxcvbnPhp class is available., (*7)

require_once 'vendor/autoload.php';

Usage

use ZxcvbnPhp\Zxcvbn;

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

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

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

echo $weak['feedback']['warning']; // will print user-facing feedback on the password, set only when score <= 2
// $weak['feedback']['suggestions'] may contain user-facing suggestions to improve the score

Scores are integers from 0 to 4: * 0 means the password is extremely guessable (within 10^3 guesses), dictionary words like 'password' or 'mother' score a 0 * 1 is still very guessable (guesses < 10^6), an extra character on a dictionary word can score a 1 * 2 is somewhat guessable (guesses < 10^8), provides some protection from unthrottled online attacks * 3 is safely unguessable (guesses < 10^10), offers moderate protection from offline slow-hash scenario * 4 is very unguessable (guesses >= 10^10) and provides strong protection from offline slow-hash scenario, (*8)

Acknowledgements

Thanks to: * @lowe for the original Javascript Zxcvbn * @Dreyer's port for reference for initial implementation * @mkopinsky for major updates to keep in sync with upstream scoring, (*9)

The Versions

23/07 2018

dev-master

9999999-dev https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

password zxcvbn

23/07 2018

0.4.0

0.4.0.0 https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

password zxcvbn

06/01 2017

0.3.0

0.3.0.0 https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php ^5.3 || ^7.0

 

The Development Requires

password zxcvbn

08/09 2016

0.2.0

0.2.0.0 https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php ^5.3 || ^7.0

 

The Development Requires

password zxcvbn

05/06 2015

0.1.4

0.1.4.0 https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

password zxcvbn

08/06 2014

0.1.3

0.1.3.0 https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

password zxcvbn

07/04 2014

0.1.2

0.1.2.0 https://github.com/bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

password zxcvbn

07/04 2014

0.1.1

0.1.1.0 https://github.com/bjeavons/zxcvbn-php

PHP implementation of the Zxcvbn password strength estimator

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

password zxcvbn

07/04 2014

0.1.0

0.1.0.0 https://github.com/bjeavons/zxcvbn-php

PHP implementation of the Zxcvbn password strength estimator

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

password zxcvbn