Enum sequoia_openpgp::packet::AED
source · [−]#[non_exhaustive]
pub enum AED {
V1(AED1),
}
Expand description
Holds an AEAD encrypted data packet.
An AEAD packet holds encrypted data. It is contains additional OpenPGP packets. See Section 5.16 of RFC 4880bis for details.
Note: This enum cannot be exhaustively matched to allow future extensions.
An AEAD packet is not normally instantiated directly. In most
cases, you’ll create one as a side-effect of encrypting a message
using the streaming serializer, or parsing an encrypted message
using the PacketParser
.
This feature is experimental.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
V1(AED1)
AED packet version 1.
Implementations
Methods from Deref<Target = AED1>
sourcepub fn symmetric_algo(&self) -> SymmetricAlgorithm
pub fn symmetric_algo(&self) -> SymmetricAlgorithm
Gets the symmetric algorithm.
sourcepub fn set_symmetric_algo(
&mut self,
sym_algo: SymmetricAlgorithm
) -> SymmetricAlgorithm
pub fn set_symmetric_algo(
&mut self,
sym_algo: SymmetricAlgorithm
) -> SymmetricAlgorithm
Sets the symmetric algorithm.
sourcepub fn aead(&self) -> AEADAlgorithm
pub fn aead(&self) -> AEADAlgorithm
Gets the AEAD algorithm.
sourcepub fn set_aead(&mut self, aead: AEADAlgorithm) -> AEADAlgorithm
pub fn set_aead(&mut self, aead: AEADAlgorithm) -> AEADAlgorithm
Sets the AEAD algorithm.
sourcepub fn chunk_size(&self) -> u64
pub fn chunk_size(&self) -> u64
Gets the chunk size.
sourcepub fn set_chunk_size(&mut self, chunk_size: u64) -> Result<()>
pub fn set_chunk_size(&mut self, chunk_size: u64) -> Result<()>
Sets the chunk size.
sourcepub fn chunk_digest_size(&self) -> Result<u64>
pub fn chunk_digest_size(&self) -> Result<u64>
Gets the size of a chunk with a digest.
sourcepub fn iv(&self) -> &[u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
pub fn iv(&self) -> &[u8]ⓘNotable traits for &[u8]impl<'_> Read for &[u8]impl<'_> Write for &mut [u8]
Gets the initialization vector for the AEAD algorithm.
sourcepub fn set_iv(&mut self, iv: Box<[u8]>) -> Box<[u8]>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn set_iv(&mut self, iv: Box<[u8]>) -> Box<[u8]>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Sets the initialization vector for the AEAD algorithm.
Methods from Deref<Target = Container>
sourcepub fn children_ref(&self) -> Option<&[Packet]>
pub fn children_ref(&self) -> Option<&[Packet]>
Returns a reference to this Packet’s children.
Returns None
if the body is not structured.
sourcepub fn children_mut(&mut self) -> Option<&mut Vec<Packet>>
pub fn children_mut(&mut self) -> Option<&mut Vec<Packet>>
Returns a mutable reference to this Packet’s children.
Returns None
if the body is not structured.
sourcepub fn descendants(&self) -> Option<Iter<'_>>
pub fn descendants(&self) -> Option<Iter<'_>>
Returns an iterator over the packet’s descendants. The descendants are visited in depth-first order.
Returns None
if the body is not structured.
Trait Implementations
sourceimpl Any<AED> for Packet
impl Any<AED> for Packet
sourcefn downcast(self) -> Result<AED, Packet>
fn downcast(self) -> Result<AED, Packet>
Attempts to downcast to T
, returning the packet if it fails. Read more
sourcefn downcast_ref(&self) -> Option<&AED>
fn downcast_ref(&self) -> Option<&AED>
Attempts to downcast to &T
, returning None
if it fails. Read more
sourcefn downcast_mut(&mut self) -> Option<&mut AED>
fn downcast_mut(&mut self) -> Option<&mut AED>
Attempts to downcast to &mut T
, returning None
if it fails. Read more
sourceimpl IntoIterator for AED
impl IntoIterator for AED
Implement IntoIterator
so that
cert::insert_packets(sig)
just works.
sourceimpl MarshalInto for AED
impl MarshalInto for AED
sourcefn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Computes the maximal length of the serialized representation. Read more
sourcefn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
Serializes into the given buffer. Read more
sourceimpl<'a> Parse<'a, AED> for AED
impl<'a> Parse<'a, AED> for AED
impl Eq for AED
impl StructuralEq for AED
impl StructuralPartialEq for AED
Auto Trait Implementations
impl RefUnwindSafe for AED
impl Send for AED
impl Sync for AED
impl Unpin for AED
impl UnwindSafe for AED
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more