minvws/horsebattery

A password generator inspired by https://xkcd.com/936/

v1.1.3 2022-02-18 13:07 UTC

This package is auto-updated.

Last update: 2024-04-12 13:20:45 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.0

Installation

  1. Install the package via composer:
composer require minvws/horsebattery

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