Enum sequoia_openpgp::types::AEADAlgorithm [−][src]
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 (Non-exhaustive)
EAX mode.
OCB mode.
Private(u8)
Private algorithm identifier.
Unknown(u8)
Unknown algorithm identifier.
Implementations
impl AEADAlgorithm
[src]
impl AEADAlgorithm
[src]impl AEADAlgorithm
[src]
impl AEADAlgorithm
[src]pub fn is_supported(&self) -> bool
[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]
impl Clone for AEADAlgorithm
[src]fn clone(&self) -> AEADAlgorithm
[src]
fn clone(&self) -> AEADAlgorithm
[src]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 AEADAlgorithm
[src]
impl Debug for AEADAlgorithm
[src]impl Display for AEADAlgorithm
[src]
impl Display for AEADAlgorithm
[src]impl Hash for AEADAlgorithm
[src]
impl Hash for AEADAlgorithm
[src]impl Ord for AEADAlgorithm
[src]
impl Ord for AEADAlgorithm
[src]impl PartialEq<AEADAlgorithm> for AEADAlgorithm
[src]
impl PartialEq<AEADAlgorithm> for AEADAlgorithm
[src]fn eq(&self, other: &AEADAlgorithm) -> bool
[src]
fn eq(&self, other: &AEADAlgorithm) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &AEADAlgorithm) -> bool
[src]
fn ne(&self, other: &AEADAlgorithm) -> bool
[src]This method tests for !=
.
impl PartialOrd<AEADAlgorithm> for AEADAlgorithm
[src]
impl PartialOrd<AEADAlgorithm> for AEADAlgorithm
[src]fn partial_cmp(&self, other: &AEADAlgorithm) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &AEADAlgorithm) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for AEADAlgorithm
[src]
impl Eq for AEADAlgorithm
[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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more