GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CRYPT::OPENPGP::ARMOUR (3)

.ds Aq ’

NAME

Crypt::OpenPGP::Armour - ASCII Armouring and Unarmouring

CONTENTS

SYNOPSIS



    use Crypt::OpenPGP::Armour;

    my $armoured = Crypt::OpenPGP::Armour->armour(
                           Data => "foo bar baz",
                           Object => "FOO OBJECT",
                           Headers => {
                                         Version => 0.57,
                                         Comment => FooBar,
                                      },
                     );

    my $decoded = Crypt::OpenPGP::Armour->unarmour( $armoured ) or
        die Crypt::OpenPGP::Armour->errstr;



DESCRIPTION

This module converts arbitrary-length strings of binary octets into Base64-encoded ASCII messages suitable for transfer as text. It also converts in the opposite direction, taking an armoured message and returning the binary data, along with headers.

USAGE

Crypt::OpenPGP::Armour->armour( CW%args )

Converts arbitrary-length strings of binary octets in an encoded message containing 4 parts: head and tail markers that identify the type of content contained therein; a group of newline-separated headers at the top of the message; Base64-encoded data; and a Base64-encoded CRC24 checksum of the message body.

Returns undef on failure, the encoded message on success. In the case of failure call the class method errstr to get the error message.

%args can contain:
o Object

Specifies the type of object being armoured; the string PGP (PGP followed by a space) will be prepended to the value you pass in.

This argument is required.

o Data

The binary octets to be encoded as the body of the armoured message; these octets will be encoded into ASCII using MIME::Base64.

This argument is required.

o Headers

A reference to a hash containing key-value pairs, where the key is the name of the the header and the value the header value. These headers are placed at the top of the encoded message in the form Header: Value.

    Crypt::OpenPGP::Armour->unarmour($message)

Decodes an ASCII-armoured message and returns a hash reference whose keys are the arguments provided to armour, above. Returns undef on failure (for example, if the checksum fails to match, or if the message is in an incomprehensible format). In case of failure call the class method errstr to get the text of the error message.

AUTHOR & COPYRIGHTS

Please see the Crypt::OpenPGP manpage for author, copyright, and license information.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CRYPT::OPENPGP::ARMOUR (3) 2009-12-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.