

Crypt::RSA::DataFormat  Data creation, conversion and reporting primitives.
This module implements several data creation, conversion and reporting primitives used throughout the Crypt::RSA implementation. Primitives are available as exportable functions.
Integer To Octet String Primitive. Converts an integer into its equivalent octet string representation of length Length. If necessary, the resulting string is prefixed with nulls. If Length is not provided, returns an octet string of shortest possible length.
Hex To Octet String Primitive. Converts a hex string into its
equivalent octet string representation and returns an octet
string of shortest possible length. The hex string is not
prefixed with 0x
, etc.
Octet String to Integer Primitive. Converts an octet string into its equivalent integer representation.
Generates a random octet string of length Length. Strength specifies the degree of randomness. See Crypt::Random(3) for an explanation of the Strength parameter.
Returns the length of the Integer in bits.
Returns the octet length of the integer. If the length is not a whole number, the fractional part is dropped to make it whole.
Returns the result of String1 XOR String2.
Returns an array of segments of length Length from String. The final segment can be smaller than Length.
Vipul Ved Prakash, <mail@vipul.net>