[−][src]Struct tss_esapi::utils::Tpm2BPublicBuilder
Helper for building TPM2B_PUBLIC
values out of its subcomponents.
Currently the implementation is incomplete, focusing on creating objects of RSA type.
Implementations
impl Tpm2BPublicBuilder
[src]
pub fn new() -> Self
[src]
Create a new builder with default (i.e. empty or null) placeholder values.
pub fn with_type(self, type_: TPMI_ALG_PUBLIC) -> Self
[src]
Set the type of the object to be built.
pub fn with_name_alg(self, name_alg: TPMI_ALG_HASH) -> Self
[src]
Set the algorithm used to derive the object name.
pub fn with_object_attributes(self, obj_attr: ObjectAttributes) -> Self
[src]
Set the object attributes.
pub fn with_auth_policy(self, size: u16, buffer: [u8; 64]) -> Self
[src]
Set the authentication policy hash for the object.
pub fn with_parms(self, parameters: PublicParmsUnion) -> Self
[src]
Set the public parameters of the object.
pub fn with_unique(self, unique: PublicIdUnion) -> Self
[src]
Set the unique value for the object.
pub fn build(self) -> Result<TPM2B_PUBLIC>
[src]
Build an object with the previously provided parameters.
The paramters are checked for consistency based on the TSS specifications for the
TPM2B_PUBLIC
structure and for the structures nested within it.
Currently only objects of type TPM2_ALG_RSA
are supported.
Errors
- if no public parameters are provided,
ParamsMissing
wrapper error is returned - if a public parameter type or public ID type is provided that is incosistent with the
object type provided,
InconsistentParams
wrapper error is returned
Panics
- will panic on unsupported platforms (i.e. on 8 bit processors)
Trait Implementations
impl Default for Tpm2BPublicBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for Tpm2BPublicBuilder
impl Send for Tpm2BPublicBuilder
impl Sync for Tpm2BPublicBuilder
impl Unpin for Tpm2BPublicBuilder
impl UnwindSafe for Tpm2BPublicBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Free for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,