Struct tss_esapi::structures::PublicRsaParametersBuilder
source · [−]pub struct PublicRsaParametersBuilder { /* private fields */ }Expand description
Builder for TPMS_RSA_PARMS values.
Implementations
sourceimpl PublicRsaParametersBuilder
impl PublicRsaParametersBuilder
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new PublicRsaParametersBuilder
sourcepub const fn new_restricted_decryption_key(
symmetric: SymmetricDefinitionObject,
key_bits: RsaKeyBits,
exponent: RsaExponent
) -> Self
pub const fn new_restricted_decryption_key(
symmetric: SymmetricDefinitionObject,
key_bits: RsaKeyBits,
exponent: RsaExponent
) -> Self
Creates a PublicRsaParametersBuilder that is setup to build a restructed decryption key.
sourcepub const fn new_unrestricted_signing_key(
rsa_scheme: RsaScheme,
key_bits: RsaKeyBits,
exponent: RsaExponent
) -> Self
pub const fn new_unrestricted_signing_key(
rsa_scheme: RsaScheme,
key_bits: RsaKeyBits,
exponent: RsaExponent
) -> Self
Creates a PublicRsaParametersBuilder that is setup to build 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 PublicRsaParametersBuilder.
sourcepub const fn with_scheme(self, rsa_scheme: RsaScheme) -> Self
pub const fn with_scheme(self, rsa_scheme: RsaScheme) -> Self
Adds a RsaScheme to the PublicRsaParametersBuilder.
sourcepub const fn with_key_bits(self, key_bits: RsaKeyBits) -> Self
pub const fn with_key_bits(self, key_bits: RsaKeyBits) -> Self
Adds RsaKeyBits to the PublicRsaParametersBuilder.
sourcepub const fn with_exponent(self, exponent: RsaExponent) -> Self
pub const fn with_exponent(self, exponent: RsaExponent) -> Self
Adds RsaExponent to the PublicRsaParametersBuilder.
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 PublicRsaParametersBuilder.
Arguments
set-trueinidcates that the key is going to be used for signing operations.falseindicates 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 PublicRsaParametersBuilder.
Arguments
set-trueindicates that the key is going to be used for decryption operations.falseindicates 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 PublicRsaParametersBuilder.
Arguments
set-trueindicates that it is going to be a restricted key.falseindicates that it is going to be a non restricted key.
sourcepub fn build(self) -> Result<PublicRsaParameters>
pub fn build(self) -> Result<PublicRsaParameters>
Build an object given the previously provided parameters.
The only mandatory parameter is the asymmetric scheme.
Errors
- if no asymmetric scheme is set,
ParamsMissingwrapper error is returned. - if the
for_signing,for_decryptionandrestrictedparameters are inconsistent with the rest of the parameters,InconsistentParamswrapper error is returned
Trait Implementations
sourceimpl Clone for PublicRsaParametersBuilder
impl Clone for PublicRsaParametersBuilder
sourcefn clone(&self) -> PublicRsaParametersBuilder
fn clone(&self) -> PublicRsaParametersBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for PublicRsaParametersBuilder
impl Debug for PublicRsaParametersBuilder
sourceimpl Default for PublicRsaParametersBuilder
impl Default for PublicRsaParametersBuilder
sourcefn default() -> PublicRsaParametersBuilder
fn default() -> PublicRsaParametersBuilder
Returns the “default value” for a type. Read more
impl Copy for PublicRsaParametersBuilder
Auto Trait Implementations
impl RefUnwindSafe for PublicRsaParametersBuilder
impl Send for PublicRsaParametersBuilder
impl Sync for PublicRsaParametersBuilder
impl Unpin for PublicRsaParametersBuilder
impl UnwindSafe for PublicRsaParametersBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more