PHPackages                             gregorj/correct-horse - 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. gregorj/correct-horse

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

gregorj/correct-horse
=====================

A random passphrase generator inspired by Randall Munroes XKCD #936

v1.1.3(4y ago)0213[1 issues](https://github.com/gregor-j/correct-horse/issues)MITPHPPHP &gt;=7.2

Since Mar 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/gregor-j/correct-horse)[ Packagist](https://packagist.org/packages/gregorj/correct-horse)[ RSS](/packages/gregorj-correct-horse/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

correct horse passphrase generator
==================================

[](#correct-horse-passphrase-generator)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![Maintainability](https://camo.githubusercontent.com/fe68f8e47c74999d545b4f416ef41c6413656bdbe5d319a6582077b2516a12be/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35313333383230303834636261613931353132392f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/gregor-j/correct-horse/maintainability)[![Test Coverage](https://camo.githubusercontent.com/2f1b7305e635df8c24bdd7dec573b3d345bd03788956abc6e01eb31e905e883c/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35313333383230303834636261613931353132392f746573745f636f766572616765)](https://codeclimate.com/github/gregor-j/correct-horse/test_coverage)[![Packagist Version](https://camo.githubusercontent.com/c58f74959588b380ccb44270c2f5b42d393974f1095d3aae317550a182fd462c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f677265676f726a2f636f72726563742d686f727365)](https://packagist.org/packages/gregorj/correct-horse)

A random passphrase generator inspired by Randall Munroes [XKCD #936](https://xkcd.com/936/), [bbusschots/hsxkpasswd](https://github.com/bbusschots/hsxkpasswd), and [matt-allan/battery-staple](https://github.com/matt-allan/battery-staple). Thanks!

Why??
-----

[](#why)

I needed a generator for handing out initial passwords in PHP. The password should not be easy to guess, especially not for a computer, and the person receiving the password should be able to enter the password fast and without mistakes.

The comic that inspired a lot of people
---------------------------------------

[](#the-comic-that-inspired-a-lot-of-people)

[![To anyone who understands information theory and security and is in an infuriating argument with someone who does not (possibly involving mixed case), I sincerely apologize.](https://camo.githubusercontent.com/f6697f2639515d1582b2724617468cfc6b1772888503ff2d21619f053d1e4435/687474703a2f2f696d67732e786b63642e636f6d2f636f6d6963732f70617373776f72645f737472656e6774682e706e67)](https://xkcd.com/936/)

Dictionary
----------

[](#dictionary)

This repository contains a German word list based on the GPL-licensed German dictionary for WinEdit by Juergen Vierheilig, copied from [Crypt::HSXKPasswd::Dictionary::DE](http://bbusschots.github.io/hsxkpasswd/Crypt-HSXKPasswd/pod.html#Crypt::HSXKPasswd::Dictionary::DE). I tried to rid the word list of NSFW words.

- ['dict-de-lc.txt'](dict/dict-de-lc.txt) List of lower case German words.
- ['dict-de-uc.txt'](dict/dict-de-uc.txt) List of upper case German words.

In order to add dictionaries, either implement the [`\GregorJ\CorrectHorse\DictionaryInterface`](src/DictionaryInterface.php) or just copy files into the [dict](dict) directory and use [`\GregorJ\CorrectHorse\Dictionaries\DictionaryFile`](src/Dictionaries/DictionaryFile.php).

Usage
-----

[](#usage)

```
composer require gregorj/correct-horse
```

```
