| Package Data | |
|---|---|
| Maintainer Username: | lucasvdh |
| Maintainer Contact: | wingman@ip-home.net (wingman) |
| Package Create Date: | 2016-04-15 |
| Package Last Update: | 2016-08-23 |
| Home Page: | |
| Language: | PHP |
| License: | GPLv2 |
| Last Refreshed: | 2025-10-23 15:03:49 |
| Package Statistics | |
|---|---|
| Total Downloads: | 18 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 3 |
| Total Open Issues: | 0 |
Generates password from 2 parts: first is random, but well-readable string, second is a word from dictionary.
All options are in config file:
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.
composer require lucasvdh/passworder
Open config/app.php, and add to the providers array:
Lucasvdh\Passworder\PassworderServiceProvider::class,
In the config/app.php. add to the aliases array:
'Passworder' => Lucasvdh\Passworder\Facade\Passworder::class,
Run in the console:
php artisan vendor:publish
Config will be moved to /config/passworder.php
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