2017 © Pedro Peláez
 

library dumbpass

Smart control of dumb passwords. Guard your users from security problems by preventing them from having dumb passwords.

image

jiriferkl/dumbpass

Smart control of dumb passwords. Guard your users from security problems by preventing them from having dumb passwords.

  • Wednesday, January 25, 2017
  • by jiriferkl
  • Repository
  • 1 Watchers
  • 1 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 4 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Dumbpass

Latest Stable Version Build Status PHPStan License, (*1)

Smart control of dumb passwords. Guard your users from security problems by preventing them from having dumb passwords., (*2)

Introduction

This package can be used to verify the user password. It checks list of 10,000 worst passwords as analyzed by an IT security analyst., (*3)

With this package you have to set absolutely nothing. Everything is pre-set. But you can set everything you like., (*4)

This package * Checks password strength (length, numbers, capital letters..) Default settings is bellow. * Checks list of 10,000 worst passwords * Returns result in simple object which contains: * boolean result variable * array with error messages (If any) * Default language is EN but you can choose another (examples bellow), (*5)

Install

Via composer, (*6)

composer require jiriferkl/dumbpass

You must have PHP 7.0., (*7)

Use

Default setting is: * Minimum length 9 characters * Password has to contain at least one number * Password has to contain at least one capital letter * Password has to contain at least one lower case letter * Password has to contain at least one special character * Password has to be original not just too common, (*8)

So it is very simple:, (*9)

$pass = 'P@ss_wo!rd!5';

$result = DumbPass::verify($pass);

I don't want to use default setting

So go ahead., (*10)

$pass = 'P@ss_wo!rd!5';

$criteria = new Criteria();
$criteria->enforceCapitalChars(TRUE)
    ->enforceNumberChars(TRUE)
    ->enforceSpecialChars(TRUE)
    ->enforceLowerCaseChars(TRUE)
    ->allowCommonPassCheck(TRUE)
    ->setLength(8);

$result = DumbPass::verify($pass, $criteria);

Can I choose different language please?

Yes., (*11)

$pass = 'P@ss_wo!rd!5';

//null -> default object
$result = DumbPass::verify($pass, NULL, Localization::get(Localization::CZ));

My language isn't an option

Well you have two options: * Send pull request (It's easy and it's only a few lines.) * Implements interface and make your own Messages class. It has one simple method., (*12)

$pass = 'P@ss_wo!rd!5';

$messages = new Messages(); //implements IMessage

//null -> default object
$result = DumbPass::verify($pass, NULL, NULL, $messages);

Now the messages are in your language. Congrats., (*13)

Do you have your own most common password list?

OK., (*14)

$pass = 'P@ss_wo!rd!5';

$passList = new PassList(); //implements IPassList

//null -> default object
$result = DumbPass::verify($pass, NULL, NULL, NULL, $passList);

Test

composer test

The Versions

25/01 2017

dev-master

9999999-dev https://github.com/jiriferkl/dumbpass

Smart control of dumb passwords. Guard your users from security problems by preventing them from having dumb passwords.

  Sources   Download

MIT

The Requires

 

The Development Requires

password validate verify jiriferkl dumbpass password check common passwords dumb passwords

25/01 2017

v1.0.1

1.0.1.0 https://github.com/jiriferkl/dumbpass

Smart control of dumb passwords. Guard your users from security problems by preventing them from having dumb passwords.

  Sources   Download

MIT

The Requires

 

The Development Requires

password validate verify jiriferkl dumbpass password check common passwords dumb passwords

23/01 2017

v1.0.0

1.0.0.0 https://github.com/jiriferkl/dumbpass

Smart control of dumb passwords. Guard your users from security problems by preventing them from having dumb passwords.

  Sources   Download

MIT

The Requires

 

The Development Requires

password validate verify jiriferkl dumbpass password check common passwords dumb passwords