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::MDC (3)

.ds Aq ’

NAME

Crypt::OpenPGP::MDC - MDC (modification detection code) packet

CONTENTS

SYNOPSIS



    use Crypt::OpenPGP::MDC;

    my $mdc = Crypt::OpenPGP::MDC->new( Data => foobar );
    my $digest = $mdc->digest;
    my $serialized = $mdc->save;



DESCRIPTION

Crypt::OpenPGP::MDC is a PGP MDC (modification detection code) packet. Such a packet is used alongside Encrypted-MDC data packets so that modifications to the ciphertext can be detected. The MDC packet contains a SHA-1 digest of the plaintext for comparison with the decrypted plaintext.

You generally will never need to construct a Crypt::OpenPGP::MDC packet yourself; usage is by the Crypt::OpenPGP::Ciphertext object.

USAGE

Crypt::OpenPGP::MDC->new( [ Data => CW$data ] )

Creates a new MDC packet object and returns that object. If you do not supply any data $data, the object is created empty; this is used, for example, in parse (below), to create an empty packet which is then filled from the data in the buffer.

If you wish to initialize a non-empty object, supply new with the Data parameter along with a value $data. $data should contain the plaintext prefix (length = cipher blocksize + 2), the actual plaintext, and two octets corresponding to the hex digits 0xd3 and 0x14.

CW$mdc->save

Returns the text of the MDC packet; this is the digest of the data passed to new (above) as $data, for example.

    Crypt::OpenPGP::MDC->parse($buffer)

Given $buffer, a Crypt::OpenPGP::Buffer object holding (or with offset pointing to) an MDC packet, returns a new <Crypt::OpenPGP::MDC> object, initialized with the MDC data in the buffer.

CW$mdc->digest

Returns the MDC digest data (eg. the string passed as $data to new, above).

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::MDC (3) 2009-12-10

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