[][src]Enum sequoia_openpgp::constants::AEADAlgorithm

pub enum AEADAlgorithm {
    EAX,
    OCB,
    Private(u8),
    Unknown(u8),
}

The AEAD algorithms as defined in Section 9.6 of RFC 4880bis.

The values can be converted into and from their corresponding values of the serialized format.

Use AEADAlgorithm::from to translate a numeric value to a symbolic one.

Variants

EAX

EAX mode.

OCB

OCB mode.

Private(u8)

Private algorithm identifier.

Unknown(u8)

Unknown algorithm identifier.

Methods

impl AEADAlgorithm[src]

pub fn digest_size(&self) -> Result<usize>[src]

Returns the digest size of the AEAD algorithm.

pub fn iv_size(&self) -> Result<usize>[src]

Returns the initialization vector size of the AEAD algorithm.

pub fn context(
    &self,
    sym_algo: SymmetricAlgorithm,
    key: &[u8],
    nonce: &[u8]
) -> Result<Box<dyn Aead>>
[src]

Creates a nettle context.

impl AEADAlgorithm[src]

pub fn is_supported(&self) -> bool[src]

Returns whether this algorithm is supported.

Trait Implementations

impl From<u8> for AEADAlgorithm[src]

impl From<AEADAlgorithm> for u8[src]

impl Eq for AEADAlgorithm[src]

impl PartialOrd<AEADAlgorithm> for AEADAlgorithm[src]

impl Copy for AEADAlgorithm[src]

impl PartialEq<AEADAlgorithm> for AEADAlgorithm[src]

impl Clone for AEADAlgorithm[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for AEADAlgorithm[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Display for AEADAlgorithm[src]

impl Hash for AEADAlgorithm[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for AEADAlgorithm[src]

impl Arbitrary for AEADAlgorithm[src]

fn shrink(&self) -> Box<dyn Iterator<Item = Self> + 'static>

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.