Enum tss_esapi::structures::Public
source · pub enum Public {
Rsa {
object_attributes: ObjectAttributes,
name_hashing_algorithm: HashingAlgorithm,
auth_policy: Digest,
parameters: PublicRsaParameters,
unique: PublicKeyRsa,
},
KeyedHash {
object_attributes: ObjectAttributes,
name_hashing_algorithm: HashingAlgorithm,
auth_policy: Digest,
parameters: PublicKeyedHashParameters,
unique: Digest,
},
Ecc {
object_attributes: ObjectAttributes,
name_hashing_algorithm: HashingAlgorithm,
auth_policy: Digest,
parameters: PublicEccParameters,
unique: EccPoint,
},
SymCipher {
object_attributes: ObjectAttributes,
name_hashing_algorithm: HashingAlgorithm,
auth_policy: Digest,
parameters: SymmetricCipherParameters,
unique: Digest,
},
}
Expand description
Variants§
Rsa
Fields
§
object_attributes: ObjectAttributes
§
name_hashing_algorithm: HashingAlgorithm
§
parameters: PublicRsaParameters
§
unique: PublicKeyRsa
KeyedHash
Fields
§
object_attributes: ObjectAttributes
§
name_hashing_algorithm: HashingAlgorithm
§
parameters: PublicKeyedHashParameters
Ecc
Fields
§
object_attributes: ObjectAttributes
§
name_hashing_algorithm: HashingAlgorithm
§
parameters: PublicEccParameters
SymCipher
Fields
§
object_attributes: ObjectAttributes
§
name_hashing_algorithm: HashingAlgorithm
§
parameters: SymmetricCipherParameters
Implementations§
source§impl Public
impl Public
sourcepub fn object_attributes(&self) -> ObjectAttributes
pub fn object_attributes(&self) -> ObjectAttributes
Returns the object attributes
sourcepub fn name_hashing_algorithm(&self) -> HashingAlgorithm
pub fn name_hashing_algorithm(&self) -> HashingAlgorithm
Returns the name hashing algorithm
sourcepub fn auth_policy(&self) -> &Digest
pub fn auth_policy(&self) -> &Digest
Returns the auth policy digest.
sourcepub const fn builder() -> PublicBuilder
pub const fn builder() -> PublicBuilder
Get a builder for this structure
Trait Implementations§
source§impl From<Public> for TPMT_PUBLIC
impl From<Public> for TPMT_PUBLIC
source§impl Marshall for Public
impl Marshall for Public
source§fn marshall(&self) -> Result<Vec<u8>>
fn marshall(&self) -> Result<Vec<u8>>
Produce a marshalled TPMT_PUBLIC
Note: for TPM2B_PUBLIC marshalling use PublicBuffer
const BUFFER_SIZE: usize = 612usize
source§impl PartialEq for Public
impl PartialEq for Public
source§impl TryFrom<Public> for DecodedKey
impl TryFrom<Public> for DecodedKey
source§impl TryFrom<Public> for PublicBuffer
impl TryFrom<Public> for PublicBuffer
source§impl TryFrom<Public> for SubjectPublicKeyInfo
impl TryFrom<Public> for SubjectPublicKeyInfo
source§fn try_from(value: Public) -> Result<Self, Self::Error>
fn try_from(value: Public) -> Result<Self, Self::Error>
Converts crate::structures::Public::Rsa
and crate::structures::Public::Ecc
to picky_asn1_x509::SubjectPublicKeyInfo
.
§Details
The result can be used to convert TPM public keys to DER using picky_asn1_der
.
§Errors
- if other instances of
crate::structures::Public
are usedUnsupportedParam
will be returned.
source§impl TryFrom<Public> for TPM2B_PUBLIC
impl TryFrom<Public> for TPM2B_PUBLIC
source§impl TryFrom<PublicBuffer> for Public
impl TryFrom<PublicBuffer> for Public
source§impl TryFrom<TPM2B_PUBLIC> for Public
impl TryFrom<TPM2B_PUBLIC> for Public
source§impl TryFrom<TPMT_PUBLIC> for Public
impl TryFrom<TPMT_PUBLIC> for Public
source§impl UnMarshall for Public
impl UnMarshall for Public
source§fn unmarshall(marshalled_data: &[u8]) -> Result<Self>
fn unmarshall(marshalled_data: &[u8]) -> Result<Self>
Unmarshall the structure from TPMT_PUBLIC
Note: for TPM2B_PUBLIC unmarshalling use PublicBuffer
impl Eq for Public
impl StructuralPartialEq for Public
Auto Trait Implementations§
impl Freeze for Public
impl RefUnwindSafe for Public
impl Send for Public
impl Sync for Public
impl Unpin for Public
impl UnwindSafe for Public
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more