[−][src]Enum sequoia_openpgp::types::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.
Examples
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) .set_features(&features)? .set_preferred_aead_algorithms(vec![ AEADAlgorithm::EAX, ])?;
Variants
EAX mode.
OCB mode.
Private(u8)
Private algorithm identifier.
Unknown(u8)
Unknown algorithm identifier.
Implementations
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.
Examples
use sequoia_openpgp as openpgp; use openpgp::types::AEADAlgorithm; assert!(AEADAlgorithm::EAX.is_supported()); assert!(!AEADAlgorithm::OCB.is_supported());
Trait Implementations
impl Clone for AEADAlgorithm
[src]
fn clone(&self) -> AEADAlgorithm
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn from(s: AEADAlgorithm) -> u8
[src]
impl From<u8> for AEADAlgorithm
[src]
impl Hash for AEADAlgorithm
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for AEADAlgorithm
[src]
fn cmp(&self, other: &AEADAlgorithm) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<AEADAlgorithm> for AEADAlgorithm
[src]
fn eq(&self, other: &AEADAlgorithm) -> bool
[src]
fn ne(&self, other: &AEADAlgorithm) -> bool
[src]
impl PartialOrd<AEADAlgorithm> for AEADAlgorithm
[src]
fn partial_cmp(&self, other: &AEADAlgorithm) -> Option<Ordering>
[src]
fn lt(&self, other: &AEADAlgorithm) -> bool
[src]
fn le(&self, other: &AEADAlgorithm) -> bool
[src]
fn gt(&self, other: &AEADAlgorithm) -> bool
[src]
fn ge(&self, other: &AEADAlgorithm) -> bool
[src]
impl StructuralEq for AEADAlgorithm
[src]
impl StructuralPartialEq for AEADAlgorithm
[src]
Auto Trait Implementations
impl RefUnwindSafe for AEADAlgorithm
impl Send for AEADAlgorithm
impl Sync for AEADAlgorithm
impl Unpin for AEADAlgorithm
impl UnwindSafe for AEADAlgorithm
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,