2017 © Pedro Peláez
 

library passwordgenerator

description_text

image

npluis/passwordgenerator

description_text

  • Saturday, April 8, 2017
  • by npluis
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Minimum PHP Version Build Status, (*1)

PasswordGenerator

Simple Password Generator for PHP, (*2)

Requirements

  • PHP 7.0

Installation

composer require npluis/passwordgenerator, (*3)

Usage Password Generator

basic usage

<?php
require 'vendor/autoload.php';


$generator = new \Npluis\PasswordGenerator\PasswordGenerator();
$password = $generator->create();
  • length between 8 and 10: $generator->create(8,10);
  • fixed length: $generator->create(12,12);
  • only a-zA-Z0-0: $generator->setAllowBrackets(false)->setAllowSpecial(false)->create();

advanced usage

use your own character set, (*4)

$generator->setChars('AbCdEfG@#$%%<>;')->setAllowSpecial(false)->setAllowBrackets(false), (*5)

Usage Password Checker

To prevent weak passwords from being generated or entered by a user when creating a new one you can use some checks., (*6)

check for blacklist words (like password, admin, qwerty, etc), (*7)

$checker->addToBlacklist('blacklist');
$checker->checkPassword('123blacklist'); //BLACKLIST_WORD
$checker->checkPassword('BlackList'); //BLACKLIST_WORD

check for weak passwords like 1111 or aaa by specifying the minimum number of unique lower case characters ```php $checker->setMinUniqueChars(3); $checker->checkPassword('111Aa'); //UNIQUE_CHARS only two unique lowercase chars a and 1, (*8)

The Versions

08/04 2017

dev-master

9999999-dev

description_text

  Sources   Download

proprietary

The Development Requires

by N. Pluis

07/04 2017

1.0

1.0.0.0

description_text

  Sources   Download

proprietary

by N. Pluis