PHPackages                             lizhineng/passphrase - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lizhineng/passphrase

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lizhineng/passphrase
====================

07PHP

Since Jan 29Pushed 4y agoCompare

[ Source](https://github.com/lizhineng/passphrase)[ Packagist](https://packagist.org/packages/lizhineng/passphrase)[ RSS](/packages/lizhineng-passphrase/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Create strong and reliable passphrase.
======================================

[](#create-strong-and-reliable-passphrase)

The package based on the idea of [EFF Dice-Generated Passphrases](https://www.eff.org/dice). It can let you easily generate a human-friendly and memorable password suggestion for your user and also you can use it as a password recovery token.

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

[](#installation)

You may use Composer to install passphrase package into your PHP project:

```
composer require lizhineng/passphrase

```

Usage
-----

[](#usage)

```
use Zhineng\Passphrase\ArrayRepository;
use Zhineng\Passphrase\Passphrase;

$passphrase = new Passphrase(new ArrayRepository);

$passphrase->make();  // it-will-return-a-strong-passphrase

```

Passphrase initializer accepts a word repository, the example above use an array repository that comes along with the package.

To generate a new random passphrase simply call `make` method. Without any customization, it will give you a 6-word, dash-seperated passphrase.

### Words Customization

[](#words-customization)

The default passphrase consists of 6 words, sometimes you want a shorter or longer one. Just simply call `words` method with your desired words counting:

```
// generate a passphrase containing 5 words.
$passphrase->words(5);

```

### Seperator Customization

[](#seperator-customization)

The default seperator to glue random words is a dash character `-`, if you want to change it, simply call `seperatedBy` method with the seperator:

```
// generate a passphrase like, it_will_return_a_strong_passphrase
$passphrase->seperatedBy('_');

```

---

Don't forget the methods are chainable, let's say if you want a 6-word, colon-seperated passphrase, you could rewrite the code as the following:

```
$passphrase->words(6)
    ->seperatedBy(':')
    ->make();

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2339485?v=4)[Zhineng Li](/maintainers/lizhineng)[@lizhineng](https://github.com/lizhineng)

---

Top Contributors

[![lizhineng](https://avatars.githubusercontent.com/u/2339485?v=4)](https://github.com/lizhineng "lizhineng (1 commits)")

### Embed Badge

![Health badge](/badges/lizhineng-passphrase/health.svg)

```
[![Health](https://phpackages.com/badges/lizhineng-passphrase/health.svg)](https://phpackages.com/packages/lizhineng-passphrase)
```

###  Alternatives

[mediconesystems/livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS

1.2k711.3k8](/packages/mediconesystems-livewire-datatables)[lorisleiva/cron-translator

Makes CRON expressions human-readable

3148.5M31](/packages/lorisleiva-cron-translator)[dusank/knapsack

Collection library for PHP

5351.0M25](/packages/dusank-knapsack)[log1x/poet

Configuration-based post type, taxonomy, editor color palette, block category, and block registration for Sage 10.

218280.1k1](/packages/log1x-poet)[freemius/wordpress-sdk

Freemius WordPress SDK

303101.4k4](/packages/freemius-wordpress-sdk)[prestashop/psgdpr

PrestaShop module psgdpr

326.3M2](/packages/prestashop-psgdpr)

PHPackages © 2026

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