Skip to content
A Dutch human-friendly password generator
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
composer.json

README.md

Dutch human-friendly password generator

Generates password from 2 parts: first is random, but well-readable string, second is a word from dictionary.

All options are in config file:

  • random_uppercase: make several letters uppercase [true/false]
  • uppercase_chance: chance to make letter uppercase. Applies for each letter. [0-9]
  • add_numbers: add or not numbers to password (to the end of both parts). [true/false]
  • number_chance: chance to add number [0-9]

Wordset

This package uses a wordset to generate passwords. These words are located in /config/wordset.txt after php artisan vendor:publish. If you want a customized wordset, change this file.

The current wordset was aquired from OpenTaal, minus all words that are shorter than 4 characters, are abbreviations, contain numbers, contain white space or contain special characters.

Install

1: install via composer:

composer require lucasvdh/passworder

2: add service provider:

Open config/app.php, and add to the providers array:

Lucasvdh\Passworder\PassworderServiceProvider::class,

3: add facade alias:

In the config/app.php. add to the aliases array:

'Passworder' => Lucasvdh\Passworder\Facade\Passworder::class,

4: Publishing config:

Run in the console:

php artisan vendor:publish

Config will be moved to /config/passworder.php

Usage examples:

Code:

$start = microtime(true);
for( $i=0; $i<10; $i++ ) {
	echo \Passworder::gen()."\r\n";
}
echo "\r\nTime: ".((microtime(true)-$start)*1000)."ms";

Config:

	'random_uppercase' => true,
	'uppercase_chance' => 1,        # 0-9
	'add_numbers' => true,
	'number_chance' => 5,           # 0-9
	'delimeters'  => '-_!@%.#',

Output:

digcu<filosofe2
neddu0/ecartErEn
dibre(reef
sorpo-boterDOos
budti)daKladder
rugso%arcadIa7
purcu5!kweking
CetMo9#volzAliG6
kerto3_froufrou4
madpa3-zandAal1

Time: 15.393972396851ms
You can’t perform that action at this time.