Struct tss_esapi::structures::PublicEccParametersBuilder
source · pub struct PublicEccParametersBuilder { /* private fields */ }
Expand description
Builder for PublicEccParameters.
Implementations§
source§impl PublicEccParametersBuilder
impl PublicEccParametersBuilder
pub const fn new() -> Self
sourcepub const fn new_restricted_decryption_key(
symmetric: SymmetricDefinitionObject,
curve: EccCurve
) -> Self
pub const fn new_restricted_decryption_key( symmetric: SymmetricDefinitionObject, curve: EccCurve ) -> Self
Create parameters for a restricted decryption key (i.e. a storage key)
sourcepub const fn new_unrestricted_signing_key(
scheme: EccScheme,
curve: EccCurve
) -> Self
pub const fn new_unrestricted_signing_key( scheme: EccScheme, curve: EccCurve ) -> Self
Create parameters for an unrestricted signing key
sourcepub const fn with_symmetric(self, symmetric: SymmetricDefinitionObject) -> Self
pub const fn with_symmetric(self, symmetric: SymmetricDefinitionObject) -> Self
Adds a SymmetricDefinitionObject to the PublicEccParametersBuilder.
sourcepub const fn with_ecc_scheme(self, ecc_scheme: EccScheme) -> Self
pub const fn with_ecc_scheme(self, ecc_scheme: EccScheme) -> Self
Adds a EccScheme to the PublicEccParametersBuilder.
sourcepub const fn with_curve(self, ecc_curve: EccCurve) -> Self
pub const fn with_curve(self, ecc_curve: EccCurve) -> Self
Adds EccCurve to the PublicEccParametersBuilder.
sourcepub const fn with_key_derivation_function_scheme(
self,
key_derivation_function_scheme: KeyDerivationFunctionScheme
) -> Self
pub const fn with_key_derivation_function_scheme( self, key_derivation_function_scheme: KeyDerivationFunctionScheme ) -> Self
Adds KeyDerivationFunctionScheme to the PublicEccParametersBuilder.
sourcepub const fn with_is_signing_key(self, set: bool) -> Self
pub const fn with_is_signing_key(self, set: bool) -> Self
Adds a flag that indicates if the key is going to be used for signing to the PublicEccParametersBuilder.
§Arguments
set
-true
inidcates that the key is going to be used for signing operations.false
indicates that the key is not going to be used for signing operations.
sourcepub const fn with_is_decryption_key(self, set: bool) -> Self
pub const fn with_is_decryption_key(self, set: bool) -> Self
Adds a flag that indicates if the key is going to be used for decryption to the PublicEccParametersBuilder.
§Arguments
set
-true
indicates that the key is going to be used for decryption operations.false
indicates that the key is not going to be used for decryption operations.
sourcepub const fn with_restricted(self, set: bool) -> Self
pub const fn with_restricted(self, set: bool) -> Self
Adds a flag that inidcates if the key is going to be restrictied to the PublicEccParametersBuilder.
§Arguments
set
-true
indicates that it is going to be a restricted key.false
indicates that it is going to be a non restricted key.
sourcepub fn build(self) -> Result<PublicEccParameters>
pub fn build(self) -> Result<PublicEccParameters>
Build an object given the previously provided parameters.
The only mandatory parameters are the asymmetric scheme and the elliptic curve.
§Errors
- if no asymmetric scheme is set,
ParamsMissing
wrapper error is returned. - if the
for_signing
,for_decryption
andrestricted
parameters are inconsistent with the rest of the parameters,InconsistentParams
wrapper error is returned
Trait Implementations§
source§impl Clone for PublicEccParametersBuilder
impl Clone for PublicEccParametersBuilder
source§fn clone(&self) -> PublicEccParametersBuilder
fn clone(&self) -> PublicEccParametersBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more