For some functionality the library needs to know about certificates and keys:

IPgpKeyProvider Interface

At certain points in the process of encrypting or decrypting messages, public and/or private PGP key are required. In case of private keys, the respective password to access the key is also required. The interface defines the following operations that are called during the process on demand.

When sending emails, keys and passwords are retrieved by the respective email addresses used when sending the mail (FROM, TO, CC, BCC). When receiving emails, required keys are referenced within an email by their key id. Hence keys/passwords may be retrieved by email address and/or key id.

PGP Keys carry some details like type, validity, creation and expiry date, fingerprint, email address, and a "Key ID" which is typically displayed as a string in hexadecimal notation, e.g. '048F841A'. Typically this is also part of the filename when a key is exported from key management software in PEM format, and it can be accessed from the UI of your key management software or using the command line tool of choice. The callback operations will ask for this Key ID, but by its decimal integer value, in this example 76514330. Future versions might offer to retrieve the keys by the hexadecimal key value as well.

Crypto Operations

loadCertificateStore

loadPgpPublicKeyRing

setPgpKeyProvider