pub fn psa_export_public_key_size(key_attrs: &psa_key_attributes_t) -> Result<usize> {
    macro_rules! export_asn1_int_max_size {
        ($size:expr) => {
            ($size) / 8 + 5
        };
    };

    match key_attrs.core.type_ {
        PSA_KEY_TYPE_RSA_PUBLIC_KEY | PSA_KEY_TYPE_RSA_KEYPAIR => Ok(usize::from(
            export_asn1_int_max_size!(key_attrs.core.bits) + 11,
        )),
        _ => Err(ResponseStatus::PsaErrorNotSupported),
    }
}
/// Compute the size of the public key material to be exported, given the attributes of the key.
/// Implementing `PSA_KEY_EXPORT_MAX_SIZE` for public keys only, as defined in `crypto_sizes.h` (Mbed Crypto).
Compute the size of the public key material to be exported, given the attributes of the key.
Implementing `PSA_KEY_EXPORT_MAX_SIZE` for public keys only, as defined in `crypto_sizes.h` (Mbed Crypto).
Compute the size of the public key material to be exported given the attributes of the key . Implementing ` PSA_KEY_EXPORT_MAX_SIZE ` for public keys only as defined in ` crypto_sizes . h ` ( Mbed Crypto ) .
pub fn psa_export_public_key_size(key_attrs: &psa_key_attributes_t) -> Result<usize> {
    macro_rules! export_asn1_int_max_size {
        ($size:expr) => {
            ($size) / 8 + 5
        };
    };
    match key_attrs.core.type_ {
        PSA_KEY_TYPE_RSA_PUBLIC_KEY | PSA_KEY_TYPE_RSA_KEYPAIR => Ok(usize::from(
            export_asn1_int_max_size!(key_attrs.core.bits) + 11,
        )),
        _ => Err(ResponseStatus::PsaErrorNotSupported),
    }
}
pub fn psa_export_public_key_size ( key_attrs : & psa_key_attributes_t ) -> Result < usize > { macro_rules! export_asn1_int_max_size { ( $size : expr ) => { ( $size ) 8 5 } ; } ; match key_attrs . core . type_ { PSA_KEY_TYPE_RSA_PUBLIC_KEY | PSA_KEY_TYPE_RSA_KEYPAIR => Ok ( usize :: from ( export_asn1_int_max_size ! ( key_attrs core bits ) + 11 , ) ) , _ => Err ( ResponseStatus :: PsaErrorNotSupported ) , } }
Compute the size of the public key material to be exported, given the attributes of the key.
Compute the size of the public key material to be exported given the attributes of the key .
key_attrs
&psa_key_attributes_t
key_attrs
&psa_key_attributes_t