arokettu/pgp-word-list

PGP Word List Encoder/Decoder

1.0.2 2024-09-26 00:13 UTC

This package is auto-updated.

Last update: 2024-11-26 00:41:16 UTC


README

Packagist PHP Version License Gitlab CI Codecov

PGP Word List encoder and decoder library for PHP.

Installation

composer require 'arokettu/pgp-word-list'

Simple use

<?php

$encoded = \Arokettu\PgpWordList\PgpWordList::encode('test test');
var_dump($encoded); // "indoors glossary hockey hydraulic bison hydraulic fracture hurricane indoors"

$decoded = \Arokettu\PgpWordList\PgpWordList::decode(
    'indoors glossary hockey hydraulic bison hydraulic fracture hurricane indoors'
);
var_dump($decoded); // "test test"

// fuzzy decoding
$decoded = \Arokettu\PgpWordList\PgpWordList::decode(
    'indoors glossary hokkey hydrolic bson hydraulic fracture hurricane inndoors',
    2
);
var_dump($decoded); // "test test"

Documentation

Read full documentation here: https://sandfox.dev/php/pgp-word-list.html

Support

Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/php-pgp-word-list/-/issues

Feel free to ask any questions in our room on Gitter: https://gitter.im/arokettu/community

License

The library is available as open source under the terms of the MIT License.