pub fn convert_key_type(key_type: KeyType) -> Result<psa_key_type_t> {
    match key_type {
        KeyType::RsaKeyPair => Ok(PSA_KEY_TYPE_RSA_KEYPAIR),
        KeyType::RsaPublicKey => Ok(PSA_KEY_TYPE_RSA_PUBLIC_KEY),
        _ => Err(ResponseStatus::PsaErrorNotSupported),
    }
}
/// Converts between native and Mbed Crypto type values.
///
/// # Errors
///
/// Only `KeyType::RsaKeypair` and `KeyType::RsaPublicKey` are supported. Returns
/// ResponseStatus::PsaErrorNotSupported otherwise.
Converts between native and Mbed Crypto type values.
Converts between native and Mbed Crypto type values .
pub fn convert_key_type(key_type: KeyType) -> Result<psa_key_type_t> {
    match key_type {
        KeyType::RsaKeyPair => Ok(PSA_KEY_TYPE_RSA_KEYPAIR),
        KeyType::RsaPublicKey => Ok(PSA_KEY_TYPE_RSA_PUBLIC_KEY),
        _ => Err(ResponseStatus::PsaErrorNotSupported),
    }
}
pub fn convert_key_type ( key_type : KeyType ) -> Result < psa_key_type_t > { match key_type { KeyType :: RsaKeyPair => Ok ( PSA_KEY_TYPE_RSA_KEYPAIR ) , KeyType :: RsaPublicKey => Ok ( PSA_KEY_TYPE_RSA_PUBLIC_KEY ) , _ => Err ( ResponseStatus :: PsaErrorNotSupported ) , } }
Converts between native and Mbed Crypto type values.
Converts between native and Mbed Crypto type values .
key_type
KeyType
key_type
KeyType
errors
Only `KeyType::RsaKeypair` and `KeyType::RsaPublicKey` are supported. Returns
ResponseStatus::PsaErrorNotSupported otherwise.
Only ` KeyType :: RsaKeypair ` and ` KeyType :: RsaPublicKey ` are supported . Returns ResponseStatus :: PsaErrorNotSupported otherwise .