2017 © Pedro Peláez
 

library passwd

Password generator and checker

image

beeflow/passwd

Password generator and checker

  • Saturday, November 5, 2016
  • by beeflow
  • Repository
  • 1 Watchers
  • 0 Stars
  • 102 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 7 % Grown

The README.md

Password generator and checker

This class can generate or check passwords with certain rules., (*1)

It can generate a password based on rules that determine which characters it can contain., (*2)

Currently it can verify if the password contains a given number of lower case letters, upper case letters, digits, special characters and a minimum length., (*3)

The class can also take a given password and verify if it matches the requested rules and check a password strength., (*4)

Usage example

<?php

 use Beeflow\Passwd\Passwd;

 // I am changing default password policy
 $passwordPolicy = array('specialCharsCount' => 3, 'minimumPasswordLength' => 12);

 $password = new Passwd( $passwordPolicy );

 // checking password
 $isPasswordOk = $password->check('Th1$I$myPrd!');
 if (!$isPasswordOk) {
    echo "Your password is incorrect.<br/>";
 } else {
    echo "Your password is correct.<br/>";
 }

 // checking password strength
 $password->checkStrength('Th1$I$myPrd!', 'info');
 echo "Your password strength points: " . $password->getStrengthPoints()."<br/>";
 echo "Your password strength info: " . $password->getStrengthInfo()."<br/>";

 // generating new password
 echo "Your new password: " . $password->generate() ."<br/>";

The Versions

05/11 2016

dev-master

9999999-dev https://github.com/beeflow/passwd

Password generator and checker

  Sources   Download

GPL

The Requires

  • php >=5.3.0

 

by Rafal Przetakowski

validation security password