pub fn extract_certificate(key: SignedSecretKey) -> Result<Vec<u8>, Error>Expand description
Extracts an OpenPGP certificate from an OpenPGP private key.
The bytes in key_data are expected to contain valid OpenPGP private key data.
From this a SignedSecretKey is created and a [SignedPublicKey] exported, which is returned
as bytes vector.
ยงErrors
Returns an error if
- a secret key cannot be decoded from
key_data, - or writing a serialized certificate into a vector fails.