This package makes it easy to generate passphrases that are both secure and easy to remember.
It uses Diceware wordlists and is fully configurable to your needs.
It is very easy to generate a random diceware password, simply use the Facade like this:
$passphrase = Diceware::generate(); // returns 'unwind-cosmic-entryway-magnetic-stardust-ligament' return $passphrase;
Why use it?
For years, we trained everyone to use passwords that are hard for humans to remember but easy for machines to guess. If you don't want to frustrate your users, you should consider using something like Diceware to generate passphrases that are easier to remember and to typewrite.
Perhaps, the problem is best explained by this famous xkcd comic:
You can install the package via composer.
Next, publish the
diceware.php configuration file so can adjust the settings for this package.
composer require martbock/laravel-diceware php artisan vendor:publish --provider 'Martbock\Diceware\DicewareServiceProvider'
You may change the default settings in the diceware.php config file that will be published to your Laravel config directory once you install this package. Currently, the following options are supported:
'number_of_words' => 6, 'separator' => '-', 'capitalize' => false, 'wordlist' => 'english', 'custom_wordlist_path' => null, 'number_of_dice' => 5,
Of course, you can use your own wordlist, just set the
The PHP implementation is licensed under the MIT license, see LICENSE.md.
The included wordlists have the following licenses: