Crypt::OpenPGP::Util - Miscellaneous utility functions
use Crypt::OpenPGP::Util qw( func1 func2 ... );
Crypt::OpenPGP::Util contains a set of exportable utility functions used through the Crypt::OpenPGP set of libraries.
Returns the number of bits in the Math::Pari integer object $n.
Given a string $string of any length, treats the string as a base-256 representation of an integer, and returns that integer, a Math::Pari object.
Given a biginteger $int (a Math::Pari object), linearizes the integer into an octet string, and returns the octet string.
Computes $a ^ $exp mod $n and returns the value. The calculations are done using Math::Pari, and the return value is a Math::Pari object.
Computes the multiplicative inverse of $a mod $n and returns the value. The calculations are done using Math::Pari, and the return value is a Math::Pari object.
Takes a piece of text content $text and formats it into PGP canonical text, where: 1) all whitespace at the end of lines is stripped, and 2) all line endings are made up of a carriage return followed by a line feed. Returns the canonical form of the text.
Escapes $text for use in a cleartext signature; the escaping looks for any line starting with a dash, and on such lines prepends a dash ('-') followed by a space (' '). Returns the escaped text.
Please see the Crypt::OpenPGP manpage for author, copyright, and license information.