PHPackages                             27cm/password-generator - 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. 27cm/password-generator

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

27cm/password-generator
=======================

PHP library for generating easy to remember but hard to guess passwords

22962PHP

Since Sep 26Pushed 9y agoCompare

[ Source](https://github.com/27cm/password-generator)[ Packagist](https://packagist.org/packages/27cm/password-generator)[ RSS](/packages/27cm-password-generator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

XKCD Phrase Password Generator
==============================

[](#xkcd-phrase-password-generator)

A flexible and scriptable password generator which generates strong passphrases, inspired by [XKCD Comic 936](http://xkcd.com/936/). Generated passwords easy to remember, but hard to quess passwords.

[![XKCD Password Strength](https://camo.githubusercontent.com/f6697f2639515d1582b2724617468cfc6b1772888503ff2d21619f053d1e4435/687474703a2f2f696d67732e786b63642e636f6d2f636f6d6963732f70617373776f72645f737472656e6774682e706e67)](http://xkcd.com/936/)

Installing
----------

[](#installing)

With [Composer](https://getcomposer.org):

```
$ composer require 27cm/password-generator
```

Basic usage
-----------

[](#basic-usage)

Library generates phrases from frequently used words:

- English phrases (example "throat fast only idea")
- German phrases (examle "laut welt ganze liter")
- Russian phrases (example "тоже металл пора подача")
- Russian transliterated phrases (example "kater nekiy zabrat dazhe")

Generate password with default length (4 words) and default separator (space).

```
use TwentySeven\Password\Generator;
use TwentySeven\Password\WordList;

echo Generator::generateEn();
// => "throat fast only idea"

echo Generator::generateDe();
// => "laut welt ganze liter"

echo Generator::generateRu();
// => "тоже металл пора подача"

echo Generator::generateRuTranslit();
// => "kater nekiy zabrat dazhe"

echo TwentySeven\Password\Generator::generateEn(5, '-');
// => "ritual-error-raise-arab-tail"

$lists = [ new WordList\En(), new WordList\RuTranslit() ];
echo Generator::generate($lists, 5, '-');
// => "idea-dovod-critic-sever-happy"
```

Word lists
----------

[](#word-lists)

### English

[](#english)

List of 2048 most frequently used English words.

ClassCommentWord lenghthExample**WordList\\En**all words4-6have, that**WordList\\En\\Nouns**nouns4-6time, year**WordList\\En\\Verbs**verbs4-6have, would**WordList\\En\\Adjectives**adjectives4-8other, good### German

[](#german)

List of 2048 most frequently used german words (source). Words with diacritic letters (ä, ö, ü) and eszett (ß) excluded.

ClassCommentWord lenghthExample**WordList\\De**all words4-6sich, nicht### Russian

[](#russian)

Lists consist of 2048 most frequently used Russain words ([source](http://dict.ruslang.ru/freq.php)).

ClassCommentWord lenghthExample**WordList\\Ru**all words4-6быть, этот**WordList\\Ru\\Nouns**nouns4-8человек, время**WordList\\Ru\\Verbs**verbs4-8быть, мочь**WordList\\Ru\\Adjectives**adjectives4-8новый, большой### Russian Transliterated

[](#russian-transliterated)

List of 2048 transliterated most frequently used Russain words ([source](http://dict.ruslang.ru/freq.php)). "Hard" to transliterate letters (ь, ъ) excluded.

ClassCommentWord lenghthExample**WordList\\RuTranslit**all words4-6chto, etot**WordList\\RuTranslit\\Nouns**nouns4-8chelovek, vremya**WordList\\RuTranslit\\Verbs**verbs4-8moch, skazat**WordList\\RuTranslit\\Adjectives**adjectives4-8novyy, bolshoySecurity
--------

[](#security)

Library uses [CSPRNG](https://secure.php.net/manual/en/book.csprng.php) for random number generation.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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://www.gravatar.com/avatar/a6e0228502b6184c1c899f87ac7e58a9f2f817a84f1caaed65ef00ed89984e5f?d=identicon)[27cm](/maintainers/27cm)

---

Top Contributors

[![anton-kotik](https://avatars.githubusercontent.com/u/1649877?v=4)](https://github.com/anton-kotik "anton-kotik (8 commits)")

### Embed Badge

![Health badge](/badges/27cm-password-generator/health.svg)

```
[![Health](https://phpackages.com/badges/27cm-password-generator/health.svg)](https://phpackages.com/packages/27cm-password-generator)
```

###  Alternatives

[phpsagas/orchestrator

Main component controls and coordinates saga participants

3228.0k1](/packages/phpsagas-orchestrator)[wpsitecare/carelib

A collection of helpful functions to make creating an awesome theme more enjoyable.

164.6k](/packages/wpsitecare-carelib)

PHPackages © 2026

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