Enum yubihsm::algorithm::AuthAlg [−][src]
#[repr(u8)]pub enum AuthAlg { YUBICO_AES, }
Valid algorithms for auth keys
Variants
YUBICO_AES
YubiHSM AES PSK authentication
Methods
impl AuthAlg
[src]
impl AuthAlg
pub fn from_u8(tag: u8) -> Result<Self, AlgorithmError>
[src]
pub fn from_u8(tag: u8) -> Result<Self, AlgorithmError>
Convert an unsigned byte tag into an AuthAlgorithm
(if valid)
pub fn to_u8(self) -> u8
[src]
pub fn to_u8(self) -> u8
Serialize algorithm ID as a byte
pub fn key_len(self) -> usize
[src]
pub fn key_len(self) -> usize
Return the size of the given key (as expected by the YubiHSM2
) in bytes
Trait Implementations
impl Copy for AuthAlg
[src]
impl Copy for AuthAlg
impl Clone for AuthAlg
[src]
impl Clone for AuthAlg
fn clone(&self) -> AuthAlg
[src]
fn clone(&self) -> AuthAlg
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for AuthAlg
[src]
impl Debug for AuthAlg
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for AuthAlg
[src]
impl Eq for AuthAlg
impl PartialEq for AuthAlg
[src]
impl PartialEq for AuthAlg
fn eq(&self, other: &AuthAlg) -> bool
[src]
fn eq(&self, other: &AuthAlg) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl From<AuthAlg> for Algorithm
[src]
impl From<AuthAlg> for Algorithm
impl Serialize for AuthAlg
[src]
impl Serialize for AuthAlg
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for AuthAlg
[src]
impl<'de> Deserialize<'de> for AuthAlg
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<AuthAlg, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<AuthAlg, D::Error>
Deserialize this value from the given Serde deserializer. Read more