pub fn extract_certificate(key_data: &[u8]) -> Result<Vec<u8>, Error>
Expand description
Extracts certificate (public key) from an OpenPGP TSK.
ยงErrors
Returns an error if
- a secret key cannot be decoded from
key_data
, - or writing a serialized certificate into a vector fails.