pub fn create_unrestricted_signing_rsa_public(
    scheme: RsaScheme,
    rsa_key_bits: RsaKeyBits,
    rsa_pub_exponent: RsaExponent,
) -> Result<Public> {
    let object_attributes = ObjectAttributesBuilder::new()
        .with_fixed_tpm(true)
        .with_fixed_parent(true)
        .with_sensitive_data_origin(true)
        .with_user_with_auth(true)
        .with_decrypt(false)
        .with_sign_encrypt(true)
        .with_restricted(false)
        .build()?;

    PublicBuilder::new()
        .with_public_algorithm(PublicAlgorithm::Rsa)
        .with_name_hashing_algorithm(HashingAlgorithm::Sha256)
        .with_object_attributes(object_attributes)
        .with_rsa_parameters(
            PublicRsaParametersBuilder::new_unrestricted_signing_key(
                scheme,
                rsa_key_bits,
                rsa_pub_exponent,
            )
            .build()?,
        )
        .with_rsa_unique_identifier(&PublicKeyRsa::default())
        .build()
}
/// Create the [Public] structure for an RSA unrestricted signing key.
///
/// * `scheme` - RSA scheme to be used for signing
/// * `key_bits` - Size in bits of the decryption key
/// * `pub_exponent` - Public exponent of the RSA key
Create the [Public] structure for an RSA unrestricted signing key.
Create the [ Public ] structure for an RSA unrestricted signing key .
pub fn create_unrestricted_signing_rsa_public(
    scheme: RsaScheme,
    rsa_key_bits: RsaKeyBits,
    rsa_pub_exponent: RsaExponent,
) -> Result<Public> {
    let object_attributes = ObjectAttributesBuilder::new()
        .with_fixed_tpm(true)
        .with_fixed_parent(true)
        .with_sensitive_data_origin(true)
        .with_user_with_auth(true)
        .with_decrypt(false)
        .with_sign_encrypt(true)
        .with_restricted(false)
        .build()?;
    PublicBuilder::new()
        .with_public_algorithm(PublicAlgorithm::Rsa)
        .with_name_hashing_algorithm(HashingAlgorithm::Sha256)
        .with_object_attributes(object_attributes)
        .with_rsa_parameters(
            PublicRsaParametersBuilder::new_unrestricted_signing_key(
                scheme,
                rsa_key_bits,
                rsa_pub_exponent,
            )
            .build()?,
        )
        .with_rsa_unique_identifier(&PublicKeyRsa::default())
        .build()
}
pub fn create_unrestricted_signing_rsa_public ( scheme : RsaScheme , rsa_key_bits : RsaKeyBits , rsa_pub_exponent : RsaExponent , ) -> Result < Public > { let object_attributes = ObjectAttributesBuilder :: new ( ) . with_fixed_tpm ( true ) . with_fixed_parent ( true ) . with_sensitive_data_origin ( true ) . with_user_with_auth ( true ) . with_decrypt ( false ) . with_sign_encrypt ( true ) . with_restricted ( false ) . build ( ) ? ; PublicBuilder :: new ( ) . with_public_algorithm ( PublicAlgorithm :: Rsa ) . with_name_hashing_algorithm ( HashingAlgorithm :: Sha256 ) . with_object_attributes ( object_attributes ) . with_rsa_parameters ( PublicRsaParametersBuilder :: new_unrestricted_signing_key ( scheme , rsa_key_bits , rsa_pub_exponent , ) . build ( ) ? , ) . with_rsa_unique_identifier ( & PublicKeyRsa :: default ( ) ) . build ( ) }
Create the [Public] structure for an RSA unrestricted signing key.
Create the [ Public ] structure for an RSA unrestricted signing key .
scheme
RsaScheme
rsa_key_bits
RsaKeyBits
rsa_pub_exponent
RsaExponent
scheme
RsaScheme
rsa_key_bits
RsaKeyBits
rsa_pub_exponent
RsaExponent