Function crypt4gh::keys::get_public_key
source · [−]pub fn get_public_key(key_path: &Path) -> Result<Vec<u8>, Crypt4GHError>
Expand description
Reads and decodes the public key stored in key_path
.
It supports Crypt4GH
and OpenSSH public keys. Fails if it can not read the file
or if the key is not one of the two supported formats. Returns the decoded key.