USAGE

The following functions are available for import. None are imported by default.

encode_pgp

@words = encode_pgp( $octets );

Returns a list of words drawn from the PGP word list corresponding to each octet in the input string. Even-position octets (starting at octet zero) are drawn from the even word list. Odd-position octets are drawn from the odd word list.

Proper nouns are capitalized as per the official word list.

encode_pgp_hex

@words = encode_pgp_hex( $hex_string );

Converts a string of hex digits (with or without leading "0x") to an octet string and returns the result of passing that octet string to encode_pgp.

decode_pgp

Returns a string of octets decoded from a list of PGP words or from a space-separated string of PGP words. An exception is thrown if a word is not in the PGP word list or is not in the correct even/odd position.