[][src]Enum sequoia_openpgp::types::AEADAlgorithm

#[non_exhaustive]pub enum AEADAlgorithm {

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.

Note: This enum cannot be exhaustively matched to allow future extensions.

This feature is experimental.


Use AEADAlgorithm to set the preferred AEAD algorithms on a signature:

use sequoia_openpgp as openpgp;
use openpgp::packet::signature::SignatureBuilder;
use openpgp::types::{Features, HashAlgorithm, AEADAlgorithm, SignatureType};

let features = Features::empty().set_aead();
let mut builder = SignatureBuilder::new(SignatureType::DirectKey)

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

EAX mode.


OCB mode.


Private algorithm identifier.


Unknown algorithm identifier.


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.

impl AEADAlgorithm[src]

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

Returns whether this algorithm is supported.


use sequoia_openpgp as openpgp;
use openpgp::types::AEADAlgorithm;



Trait Implementations

impl Clone for AEADAlgorithm[src]

impl Copy for AEADAlgorithm[src]

impl Debug for AEADAlgorithm[src]

impl Display for AEADAlgorithm[src]

impl Eq for AEADAlgorithm[src]

impl From<AEADAlgorithm> for u8[src]

impl From<u8> for AEADAlgorithm[src]

impl Hash for AEADAlgorithm[src]

impl Ord for AEADAlgorithm[src]

impl PartialEq<AEADAlgorithm> for AEADAlgorithm[src]

impl PartialOrd<AEADAlgorithm> for AEADAlgorithm[src]

impl StructuralEq for AEADAlgorithm[src]

impl StructuralPartialEq for AEADAlgorithm[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DynClone for T where
    T: Clone

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.