Discuss this help topic in SecureBlackbox Forum

Add a key to OpenPGP keyring

The procedure of adding a key to existing PGP keyring (assuming that the keyring is stored in a file or files on a hard drive) consists of three simple steps:

  1. Load the keyring files into a TElPGPKeyring object.
  2. Add your key (public or secret) to the keyring object:
    	keyring.AddPublicKey(publicKey);
    	keyring.AddSecretKey(secretKey);
    	
  3. Save the updated keyring back to the files.

Note that TElPGPKeyring operates a 'single key instance' policy. If the keyring already contains the key passed to AddPublicKey() or AddSecretKey() policy, no new key record will be created. Instead, the existing instance of the key will be updated, should there be any new subkeys or user IDs attached to the instance of the key passed to AddPublicKey() or AddSecretKey() call.

Please see the topic on how to load an OpenPGP key stored on a media.

How To articles about OpenPGP key management

Discuss this help topic in SecureBlackbox Forum