#[repr(transparent)]pub struct Alg(pub u16);Expand description
Algorithms defined by either the TPM_ALG_ID listing in Part 2 of the
[TPM2 Specification] or the TCG_ALG_ID list in the
TCG Algorithm Registry.
Tuple Fields§
§0: u16Implementations§
Source§impl Alg
impl Alg
pub const Rsa: Self
pub const Tdes: Self
pub const Sha1: Self
pub const Hmac: Self
pub const Aes: Self
pub const Mgf1: Self
pub const KeyedHash: Self
pub const Null: Self
pub const Xor: Self
pub const Sha256: Self
pub const Sha384: Self
pub const Sha512: Self
pub const Sm3_256: Self
pub const Sm4: Self
pub const RsaSsa: Self
pub const RsaEs: Self
pub const RsaPss: Self
pub const Oaep: Self
pub const Ecdsa: Self
pub const Ecdh: Self
pub const Ecdaa: Self
pub const Sm2: Self
pub const EcSchnorr: Self
pub const Ecmqv: Self
pub const Kdf1Sp800_56A: Self
pub const Kdf2: Self
pub const Kdf1Sp800_108: Self
pub const Ecc: Self
pub const SymCipher: Self
pub const Camellia: Self
pub const Sha3_256: Self
pub const Sha3_384: Self
pub const Sha3_512: Self
pub const Ctr: Self
pub const Ofb: Self
pub const Cbc: Self
pub const Cfb: Self
pub const Ecb: Self
Trait Implementations§
Source§impl From<TpmiAlgHash> for Alg
impl From<TpmiAlgHash> for Alg
Source§fn from(h: TpmiAlgHash) -> Alg
fn from(h: TpmiAlgHash) -> Alg
Converts to this type from the input type.
Source§impl MarshalArray for Alg
impl MarshalArray for Alg
const SIZE: usize = 2
Source§type Array = [u8; 2]
type Array = [u8; 2]
This type will always be
[u8; Self::SIZE]. However, until the
min_generic_const_args feature
is stabilized, we need this type to write the signature of
marshal_array.Source§fn marshal_array(&self, arr: &mut [u8; 2])
fn marshal_array(&self, arr: &mut [u8; 2])
Infallible as we statically know the buffer is long enough
Source§impl TryFrom<Alg> for TpmiAlgHash
impl TryFrom<Alg> for TpmiAlgHash
Source§impl UnmarshalArray for Alg
impl UnmarshalArray for Alg
type Error = Infallible
Source§fn unmarshal_array(arr: &[u8; 2]) -> Result<Self, Infallible>
fn unmarshal_array(arr: &[u8; 2]) -> Result<Self, Infallible>
This can still fail if the source buffer has a bad value, but we know
we have a buffer of the correct length.
impl Copy for Alg
impl Eq for Alg
impl StructuralPartialEq for Alg
Auto Trait Implementations§
impl Freeze for Alg
impl RefUnwindSafe for Alg
impl Send for Alg
impl Sync for Alg
impl Unpin for Alg
impl UnsafeUnpin for Alg
impl UnwindSafe for Alg
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