Enum yubihsm::algorithm::WrapAlg [−][src]
#[repr(u8)]pub enum WrapAlg { AES128_CCM, AES192_CCM, AES256_CCM, }
Valid algorithms for "wrap" (symmetric encryption/key wrapping) keys
Variants
AES128_CCM
AES-128 in Counter with CBC-MAC (CCM) mode
AES192_CCM
AES-192 in Counter with CBC-MAC (CCM) mode
AES256_CCM
AES-256 in Counter with CBC-MAC (CCM) mode
Methods
impl WrapAlg
[src]
impl WrapAlg
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 a WrapAlgorithm
(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 WrapAlg
[src]
impl Copy for WrapAlg
impl Clone for WrapAlg
[src]
impl Clone for WrapAlg
fn clone(&self) -> WrapAlg
[src]
fn clone(&self) -> WrapAlg
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 WrapAlg
[src]
impl Debug for WrapAlg
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 WrapAlg
[src]
impl Eq for WrapAlg
impl PartialEq for WrapAlg
[src]
impl PartialEq for WrapAlg
fn eq(&self, other: &WrapAlg) -> bool
[src]
fn eq(&self, other: &WrapAlg) -> 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<WrapAlg> for Algorithm
[src]
impl From<WrapAlg> for Algorithm
impl Serialize for WrapAlg
[src]
impl Serialize for WrapAlg
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 WrapAlg
[src]
impl<'de> Deserialize<'de> for WrapAlg
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<WrapAlg, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<WrapAlg, D::Error>
Deserialize this value from the given Serde deserializer. Read more