PHP code example of arokettu / pgp-word-list
1. Go to this page and download the library: Download arokettu/pgp-word-list library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
arokettu / pgp-word-list example snippets
$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"