kieranajp / password-generator
Generates human-readable, but secure, passwords.
Installs: 2 381
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=7.0
- fzaninotto/faker: ~1.5
Requires (Dev)
- phpunit/phpunit: ~4.8@dev
README
A teeny library to generate memorable yet secure passwords.
Why?
- Existing password managers didn't suit the needs I had for this project, or required you to source your own external wordlist
- I've hacked Faker into a password generator for typeable passwords
- The project I'm using this in requires secure, generated passwords that are easy to type
Installation
Requires PHP 7.0+. Install with Composer.
$ composer require kieranajp/password-generator
If you require PHP 5.3 - 5.6 support, install v1.
Example usage
To quickly try this out, you can run php example.php
. This file contains the basic usage.
require 'vendor/autoload.php'; $g = new \Kieranajp\Generator\Generator(); $g->generate(); // [ "Reagan467$Lera^" ] $g->generate(2); // [ "Christina835$Frami$", "Terrance103:Evie." ]
By default, passwords are of the following format: word - number - symbol - word - symbol
. This can easily be changed as follows:
$g->setFormat("word:num:symbol")
The default list of symbols is easy to type by a less-savvy computer user on a standard QWERTY keyboard. Other symbols can be added with $g->addSymbol('🤡')
and removed with $g->removeSymbol('🤡')
.