Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Crypt::OpenPGP::KeyBloUser)Contributed Perl DocumenCrypt::OpenPGP::KeyBlock(3)

NAME
       Crypt::OpenPGP::KeyBlock	- Key block object

SYNOPSIS
	   use Crypt::OpenPGP::KeyBlock;

	   my $packet =	Crypt::OpenPGP::UserID->new( Identity => 'foo' );
	   my $kb = Crypt::OpenPGP::KeyBlock->new;
	   $kb->add($packet);

	   my $serialized = $kb->save;

DESCRIPTION
       Crypt::OpenPGP::KeyBlock	represents a single keyblock in	a keyring.  A
       key block is essentially	just a set of associated keys containing
       exactly one master key, zero or more subkeys, some user ID packets,
       some signatures,	etc. The key is	that there is only one master key
       associated with each keyblock.

USAGE
   Crypt::OpenPGP::KeyBlock->new
       Constructs a new	key block object and returns that object.

   $kb->encrypting_key
       Returns the key that performs encryption	in this	key block. For
       example,	if a DSA key is	the master key in a key	block with an ElGamal
       subkey, encrypting_key returns the ElGamal subkey certificate, because
       DSA keys	do not perform encryption/decryption.

   $kb->signing_key
       Returns the key that performs signing in	this key block.	For example,
       if a DSA	key is the master key in a key block with an ElGamal subkey,
       encrypting_key returns the DSA master key certificate, because DSA
       supports	signing/verification.

   $kb->add($packet)
       Adds the	packet $packet to the key block. If the	packet is a PGP
       certificate (a Crypt::OpenPGP::Certificate object), the certificate is
       also added to the internal key-management mechanism.

   $kb->save
       Serializes each of the packets contained	in the KeyBlock	object,	in
       order, and returns the serialized data. This output can then be fed to
       Crypt::OpenPGP::Armour for ASCII-armouring, for example,	or can be
       written out to a	keyring	file.

   $kb->save_armoured
       Saves an	armoured version of the	keyblock (this is useful for exporting
       public keys).

AUTHOR & COPYRIGHTS
       Please see the Crypt::OpenPGP manpage for author, copyright, and
       license information.

perl v5.24.1			  2009-12-10	   Crypt::OpenPGP::KeyBlock(3)

NAME | SYNOPSIS | DESCRIPTION | USAGE | AUTHOR & COPYRIGHTS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Crypt::OpenPGP::KeyBlock&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help