koenhoeijmakers / paper-key-generator
1.0.0
2017-09-03 19:25 UTC
Requires
- php: ^7.0
This package is auto-updated.
Last update: 2024-10-12 23:15:48 UTC
README
A paper key generator for PHP, simply generates a count of words to be used as a paper key.
Installation
Require the package with composer.
composer require koenhoeijmakers/paper-key-generator
Usage
Create a new instance of the class, which can be done with the PaperKeyFactory, or by just instancing one (make sure you inject a valid WordList contract).
$paperKey = new PaperKeyGenerator(new EnglishWordList()); $paperKey = PaperKeyFactory::english();
And then call the ->make()
method.
$paperKey->make(); // surface curtain method raw swap bitter zone pink seat rookie marble dog
Optionally you can set a different divider and / or word count.
$paperKey->setDivider('-')->setCount(6)->make(); // doctor-clown-settle-material-smooth-away
Which can also be done on the fly.
$paperKey->make([ 'divider' => '=', 'count' => 8, ]); // include=ecology=list=rail=canal=slush=gaze=marriage
Credits
- Trezor (python mnemonic) - For the list of words.