Skip to content

kronolynx/pgp-word-list-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert hex strings to PGP word lists and vice-versa.

See PGP word list on WikiPedia for more information.

Installation

npm install pgp-word-list-converter

Usage

var converter = require('pgpWordConvert')();
// convert array of words
console.log(converter.toHex(['stairway', 'souvenir', 'flytrap', 'recipe']));
//convert string of words, the words can be separated with comas
console.log(converter.toHex('stairway souvenir flytrap recipe'));
// convert array of hexadecimals
console.log(converter.toWords(['D1', 'D4', '64', 'C0']));
// convert string of hexadecimals
// string examples: 'd1d464c0' , 'd1,d4,64,c0', 'd1 d4 64 c0'
console.log(converter.toWords('d1d4 64c0'));

As an optional parameter we can pass a custom PGP word list

  var converter = require('pgpWordConvert')(customList);

License

MIT license. See LICENSE

About

Convert hex strings to PGP word lists and vice-versa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published