Function public_key_material_to_key

Source
pub fn public_key_material_to_key(
    pkm: &PublicKeyMaterial,
    key_type: KeyType,
    created: &KeyGenerationTime,
    hash: Option<HashAlgorithm>,
    alg_sym: Option<SymmetricKeyAlgorithm>,
) -> Result<PublicKey, Error>
Expand description

Transform an openpgp-card PublicKeyMaterial and KeyGenerationTime into an rpgp PublicKey representation.

For ECDH decryption keys, hash and alg_sym can be optionally specified.

If hash and alg_sym are required, and the caller passes None, curve-specific default parameters are used.