Discuss this help topic in SecureBlackbox Forum
Load the OpenPGP keys
While SecureBlackbox provides several different ways to load a key from a file, we recommend to always use the keyring-based method explained in Load OpenPGP Keyrings topic. The primary reason for using this method is its high tolerance to a variety of peculiarities of third-party PGP implementations. Other methods - like the one based on the LoadFromFile() function exported by TElPGPPublicKey and TElPGPSecretKey components - only work with properly crafted key material and may fail if the key is not formatted correctly.
To load the secret key from file or data stream, use LoadFromFile() and LoadFromStream() methods of TElPGPSecretKey class. You can load the key from the file on the disk or from the stream (be it file stream, or memory stream, or BLOB stream or some other stream).
To load the secret key from X.509 certificate, use AssignFromX509() method of TElPGPSecretKey class.
To load the public key from file or data stream, use LoadFromFile() and LoadFromStream() methods of TElPGPPublicKey class. You can load the key from the file on the disk or from the stream (be it file stream, or memory stream, or BLOB stream or some other stream).
To load the public key from X.509 certificate, use AssignFromX509() method of TElPGPPublicKey class.