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: PublicKeyRsaKeyedHash
Fields
§
object_attributes: ObjectAttributes§
name_hashing_algorithm: HashingAlgorithm§
parameters: PublicKeyedHashParametersEcc
Fields
§
object_attributes: ObjectAttributes§
name_hashing_algorithm: HashingAlgorithm§
parameters: PublicEccParametersSymCipher
Fields
§
object_attributes: ObjectAttributes§
name_hashing_algorithm: HashingAlgorithm§
parameters: SymmetricCipherParametersImplementations§
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<Public> for Public
impl PartialEq<Public> 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::Publicare usedUnsupportedParamwill 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