Crypt-OpenPGP

 view release on metacpan or  search on metacpan

lib/Crypt/OpenPGP/Words.pm  view on Meta::CPAN


=head1 USAGE

=head2 Crypt::OpenPGP::Words->encode( $octet_str )

Given an octet string I<$octet_str>, encodes that string into a list of
English words.

The encoding is performed by splitting the string into octets; the list
of octets is then iterated over. There are two lists of words, 256 words
each. Two-syllable words are used for encoding odd iterations through
the loop; three-syllable words for even iterations. The word list is
formed by treating each octet as an index into the appropriate word list
(two- or three-syllable), then adding the word at that index to the list.

Returns the list of words.

=head2 Crypt::OpenPGP::Words->encode_hex( $hex_str )

Performs the exact same encoding as I<encode>; I<$hex_str>, a string
of hexadecimal digits, is first transformed into a string of octets,
then passed to I<encode>.



( run in 1.216 second using v1.01-cache-2.11-cpan-96521ef73a4 )