PHPackages                             martbock/laravel-diceware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. martbock/laravel-diceware

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

martbock/laravel-diceware
=========================

Diceware Passphrase Generator for Laravel

v2.1.0(3y ago)3264.7k↓21.2%3[1 issues](https://github.com/martbock/laravel-diceware/issues)[2 PRs](https://github.com/martbock/laravel-diceware/pulls)MITPHPPHP ^8.0CI passing

Since Nov 22Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/martbock/laravel-diceware)[ Packagist](https://packagist.org/packages/martbock/laravel-diceware)[ Docs](https://github.com/martbock/laravel-diceware)[ RSS](/packages/martbock-laravel-diceware/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (16)Used By (0)

Diceware for Laravel
====================

[](#diceware-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9392059e89995b3d2e2c6e956ef3c445e326c94625767e40e6378a67b304ae9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617274626f636b2f6c61726176656c2d64696365776172652e7376673f7374796c653d666c6174)](https://packagist.org/packages/martbock/laravel-diceware)[![StyleCI](https://camo.githubusercontent.com/dd0f6a7c67eeb49cefd855c992f3a3795e89b3d408177f1c10ebd639bb9bb95c/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3232333436383130342f736869656c643f6272616e63683d6d61696e267374796c653d666c6174)](https://github.styleci.io/repos/223468104)[![Maintainability](https://camo.githubusercontent.com/a0bba6db55dbde11d42f23bd4d54bdb97f0181ac4174713914b3219680f15f4e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f6d617274626f636b2f6c61726176656c2d64696365776172653f7374796c653d666c6174)](https://codeclimate.com/github/martbock/laravel-diceware)[![Code Coverage](https://camo.githubusercontent.com/40c3318d64c5279b824ab236f68b8db0ff93e2893ef28d9213a1d9b610227bff/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6d617274626f636b2f6c61726176656c2d64696365776172653f7374796c653d666c6174)](https://codeclimate.com/github/martbock/laravel-diceware)[![Build Status](https://github.com/martbock/laravel-diceware/workflows/Run%20tests%20with%20coverage/badge.svg)](https://github.com/martbock/laravel-diceware/actions)

This package makes it easy to generate passphrases that are both secure and easy to remember.

It uses [Diceware](http://world.std.com/~reinhold/diceware.html) wordlists and is fully configurable to your needs.

Usage
-----

[](#usage)

It's a breeze to generate a random diceware passphrase, simply use the Facade like this:

```
$passphrase = Diceware::generate();

// returns 'unwind-cosmic-entryway-MAGNETIC-stardust-ligament'
return $passphrase;
```

Why use it?
-----------

[](#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:

[![xkcd Password Strength Comic](https://camo.githubusercontent.com/480e1a1f119c225e8cce393838bfe21a4d965b01527bd33598fb0db8fa2665eb/68747470733a2f2f696d67732e786b63642e636f6d2f636f6d6963732f70617373776f72645f737472656e6774682e706e67)](https://xkcd.com/936/)

Installation
------------

[](#installation)

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'
```

Configuration
-------------

[](#configuration)

You may change the default settings in the [diceware.php config file](config/diceware.php) that you can publish to your Laravel config directory after you installed this package. Currently, the following options are supported:

```
'number_of_words'       => 6,
'separator'             => '-',
'capitalize'            => true,
'add_number'            => false,
'wordlist'              => 'english',
'custom_wordlist_path'  => null,
'number_of_dice'        => 5,
```

Of course, you can use your own wordlist, just set the `custom_wordlist_path` accordingly.

License
-------

[](#license)

The PHP implementation is licensed under the MIT license, see [LICENSE.md](LICENSE.md).

The included wordlists have the following licenses:

- [eff.txt](wordlists/eff.txt) is licensed under CC-BY-3.0 by the Electronic Frontier Foundation.
- [english.txt](wordlists/english.txt) is licensed under CC-BY-3.0 by Arnold G. Reinhold.
- [german.txt](wordlists/german.txt) is licensed under the GNU General Public License by Benjamin Tenne.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 95.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~100 days

Recently: every ~200 days

Total

13

Last Release

1170d ago

Major Versions

v1.0.10 → v2.0.02022-02-09

PHP version history (4 changes)v1.0.0PHP ^7.2

v1.0.8PHP ^7.2.5|^8.0

v1.0.10PHP ^7.4|^8.0

v2.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/97f18d7aa8bc07977bce47d06d8d140ea8ccec966a7d8a2b891c18d4b1ccbcf3?d=identicon)[martbock](/maintainers/martbock)

---

Top Contributors

[![martbock](https://avatars.githubusercontent.com/u/16653872?v=4)](https://github.com/martbock "martbock (62 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")[![sw-jannik](https://avatars.githubusercontent.com/u/94903670?v=4)](https://github.com/sw-jannik "sw-jannik (1 commits)")

---

Tags

authenticationdicewaregeneratorlaravelpasswordlaravelpasswordgeneratorpassphrasediceware

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/martbock-laravel-diceware/health.svg)

```
[![Health](https://phpackages.com/badges/martbock-laravel-diceware/health.svg)](https://phpackages.com/packages/martbock-laravel-diceware)
```

###  Alternatives

[genphrase/genphrase

Secure passphrase generator for PHP applications

118302.5k4](/packages/genphrase-genphrase)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[solidry/api-generator

PHP-code generator (based on OAS) for Laravel framework, with complete support of JSON-API data format

32626.4k](/packages/solidry-api-generator)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

451.7k](/packages/nicobleiler-php-passphrase)[yebor974/filament-renew-password

Package for manage renew password according to the last renew or other criteria

4482.6k3](/packages/yebor974-filament-renew-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
