minvws / horsebattery
A password generator inspired by https://xkcd.com/936/
Requires
- php: ^8.1
Requires (Dev)
- mockery/mockery: ^1.4.3
- orchestra/testbench: ^6.0
- phpstan/phpstan: ^0.12.80 || ^1.0.0 || ^2.0.0
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6 || ^4.0
- vimeo/psalm: ^4.4 || ^5.0
This package is auto-updated.
Last update: 2026-03-09 15:46:30 UTC
README
A password generator based on this XKCD comic. Provides a default word list in Dutch and will generate a password based on the wordlist and a given number of words.
May be expanded to include other locales in the future or configuration to allow for other word lists.
Requirements
- PHP >= 8.1
- Composer
Installation
- Install the package via composer:
composer require minvws/horsebattery
Usage
Generic usage
$generator = new HorseBattery(); $password = $generator->generate(4); // returns for instance: AandeelBijkomendeDereguleringHandelingen
Running tests
You can run the tests by issuing the following command:
$ composer run test
Contributing
If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository of this package.
License
This package is open-source and released under the European Union Public License version 1.2. You are free to use, modify, and distribute the package in accordance with the terms of the license.