|
NAMECrypt::OpenPGP::Signature - Signature packetSYNOPSISuse Crypt::OpenPGP::Signature; my $cert = Crypt::OpenPGP::Certificate->new; my $plaintext = 'foo bar'; my $sig = Crypt::OpenPGP::Signature->new( Key => $cert, Data => $plaintext, ); my $serialized = $sig->save; DESCRIPTIONCrypt::OpenPGP::Signature implements PGP signature packets and provides functionality for hashing PGP packets to obtain message digests; these digests are then signed by the secret key to form a signature.Crypt::OpenPGP::Signature reads and writes both version 3 and version 4 signatures, along with the signature subpackets found in version 4 (see Crypt::OpenPGP::Signature::SubPacket). USAGECrypt::OpenPGP::Signature->new( %arg )Creates a new signature packet object and returns that object. If there are no arguments in %arg, 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, %arg can contain:
$sig->saveSerializes the signature packet and returns a string of octets.Crypt::OpenPGP::Signature->parse($buffer)Given $buffer, a Crypt::OpenPGP::Buffer object holding (or with offset pointing to) a signature packet, returns a new Crypt::OpenPGP::Signature object, initialized with the signature data in the buffer.$sig->hash_data(@data)Prepares a digital hash of the packets in @data; the hashing method depends on the type of packets in @data, and the hashing algorithm used depends on the algorithm associated with the Crypt::OpenPGP::Signature object $sig. This digital hash is then signed to produce the signature itself.You generally do not need to use this method unless you have not passed in the Data parameter to new (above). There are two possible packet types that can be included in @data:
$sig->key_idReturns the ID of the key that created the signature.$sig->timestampReturns the time that the signature was created in Unix epoch time (seconds since 1970).$sig->digestReturns a Crypt::OpenPGP::Digest object representing the digest algorithm used by the signature.AUTHOR & COPYRIGHTSPlease see the Crypt::OpenPGP manpage for author, copyright, and license information.
Visit the GSP FreeBSD Man Page Interface. |