Crypt::OpenPGP::Plaintext - A plaintext, literal-data packet |
parse($buffer)
Crypt::OpenPGP::Plaintext - A plaintext, literal-data packet
use Crypt::OpenPGP::Plaintext;
my $pt = Crypt::OpenPGP::Plaintext->new( Data => $data, Filename => $file, ); my $serialized = $pt->save;
my $pt = Crypt::OpenPGP::Plaintext->parse($buffer);
Crypt::OpenPGP::Plaintext implements plaintext literal-data packets, and is essentially just a container for a string of octets, along with some meta-data about the plaintext.
Creates a new plaintext data packet object and returns that object. If there are no arguments in %arg, the object is created with an empty data container; 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, %arg can contain:
This argument is required (for a non-empty object).
t
and
b
, meaning ``text'' and ``binary'', respectively.
This argument is optional; Mode defaults to b
.
Returns the serialized form of the plaintext object, which is the plaintext data, preceded by some meta-data describing the data.
parse($buffer)
Given $buffer, a Crypt::OpenPGP::Buffer object holding (or with offset pointing to) a plaintext data packet, returns a new Crypt::OpenPGP::Ciphertext object, initialized with the data in the buffer.
Returns the plaintext data.
Returns the mode of the packet (either t
or b
).
Please see the Crypt::OpenPGP manpage for author, copyright, and license information.
Crypt::OpenPGP::Plaintext - A plaintext, literal-data packet |