pub fn generate_rsa_sign_key(&mut self, key_name: String) -> Result<()> {
        self.generate_key(
            key_name,
            Attributes {
                lifetime: Lifetime::Persistent,
                key_type: Type::RsaKeyPair,
                bits: 1024,
                policy: Policy {
                    usage_flags: UsageFlags {
                        sign_hash: true,
                        verify_hash: true,
                        sign_message: true,
                        verify_message: true,
                        export: false,
                        encrypt: false,
                        decrypt: false,
                        cache: false,
                        copy: false,
                        derive: false,
                    },
                    permitted_algorithms: Algorithm::AsymmetricSignature(
                        AsymmetricSignature::RsaPkcs1v15Sign {
                            hash_alg: Hash::Sha256.into(),
                        },
                    ),
                },
            },
        )
    }
/// Generate a 1024 bits RSA key pair.
/// The key can only be used for signing/verifying with the RSA PKCS 1v15 signing algorithm with SHA-256 and exporting its public part.
Generate a 1024 bits RSA key pair.
The key can only be used for signing/verifying with the RSA PKCS 1v15 signing algorithm with SHA-256 and exporting its public part.
Generate a 1024 bits RSA key pair . The key can only be used for signing / verifying with the RSA PKCS 1v15 signing algorithm with SHA - 256 and exporting its public part .
pub fn generate_rsa_sign_key(&mut self, key_name: String) -> Result<()> {
        self.generate_key(
            key_name,
            Attributes {
                lifetime: Lifetime::Persistent,
                key_type: Type::RsaKeyPair,
                bits: 1024,
                policy: Policy {
                    usage_flags: UsageFlags {
                        sign_hash: true,
                        verify_hash: true,
                        sign_message: true,
                        verify_message: true,
                        export: false,
                        encrypt: false,
                        decrypt: false,
                        cache: false,
                        copy: false,
                        derive: false,
                    },
                    permitted_algorithms: Algorithm::AsymmetricSignature(
                        AsymmetricSignature::RsaPkcs1v15Sign {
                            hash_alg: Hash::Sha256.into(),
                        },
                    ),
                },
            },
        )
    }
pub fn generate_rsa_sign_key ( & mut self , key_name : String ) -> Result < ( ) > { self . generate_key ( key_name , Attributes { lifetime : Lifetime :: Persistent , key_type : Type :: RsaKeyPair , bits : 1024 , policy : Policy { usage_flags : UsageFlags { sign_hash : true , verify_hash : true , sign_message : true , verify_message : true , export : false , encrypt : false , decrypt : false , cache : false , copy : false , derive : false , } , permitted_algorithms : Algorithm :: AsymmetricSignature ( AsymmetricSignature :: RsaPkcs1v15Sign { hash_alg : Hash :: Sha256 . into ( ) , } , ) , } , } , ) }
Generate a 1024 bits RSA key pair.
Generate a 1024 bits RSA key pair .
&mut self
key_name
String
&mut self
key_name
String