pub fn import_ecc_pair_secp_r1_key(&mut self, key_name: String, data: Vec<u8>) -> Result<()> {
        let attributes = Attributes {
            key_type: Type::EccKeyPair {
                curve_family: EccFamily::SecpR1,
            },
            bits: 256,
            lifetime: Lifetime::Volatile,
            policy: Policy {
                usage_flags: UsageFlags {
                    derive: true,
                    ..Default::default()
                },
                permitted_algorithms: KeyAgreement::Raw(RawKeyAgreement::Ecdh).into(),
            },
        };
        self.import_key(key_name, attributes, data)
    }
/// Import ECC key pair with secp R1 curve family.
/// The key can only be used for key agreement with Ecdh algorithm.
Import ECC key pair with secp R1 curve family.
The key can only be used for key agreement with Ecdh algorithm.
Import ECC key pair with secp R1 curve family . The key can only be used for key agreement with Ecdh algorithm .
pub fn import_ecc_pair_secp_r1_key(&mut self, key_name: String, data: Vec<u8>) -> Result<()> {
        let attributes = Attributes {
            key_type: Type::EccKeyPair {
                curve_family: EccFamily::SecpR1,
            },
            bits: 256,
            lifetime: Lifetime::Volatile,
            policy: Policy {
                usage_flags: UsageFlags {
                    derive: true,
                    ..Default::default()
                },
                permitted_algorithms: KeyAgreement::Raw(RawKeyAgreement::Ecdh).into(),
            },
        };
        self.import_key(key_name, attributes, data)
    }
pub fn import_ecc_pair_secp_r1_key ( & mut self , key_name : String , data : Vec < u8 > ) -> Result < ( ) > { let attributes = Attributes { key_type : Type :: EccKeyPair { curve_family : EccFamily :: SecpR1 , } , bits : 256 , lifetime : Lifetime :: Volatile , policy : Policy { usage_flags : UsageFlags { derive : true , .. Default :: default ( ) } , permitted_algorithms : KeyAgreement :: Raw ( RawKeyAgreement :: Ecdh ) . into ( ) , } , } ; self . import_key ( key_name , attributes , data ) }
Import ECC key pair with secp R1 curve family.
Import ECC key pair with secp R1 curve family .
&mut self
key_name
String
data
Vec<u8>
&mut self
key_name
String
data
Vec<u8>