Struct sequoia_openpgp::packet::aed::AED1
source · pub struct AED1 { /* private fields */ }
Expand description
Holds an AEAD encrypted data packet.
An AEAD encrypted data packet holds encrypted data. The data contains additional OpenPGP packets. See Section 5.16 of RFC 4880bis for details.
An AED 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. It has not been standardized and we advise users to not emit AED packets.
§A note on equality
An unprocessed (encrypted) AED
packet is never considered equal
to a processed (decrypted) one. Likewise, a processed (decrypted)
packet is never considered equal to a structured (parsed) one.
Implementations§
source§impl AED1
impl AED1
sourcepub fn new(
sym_algo: SymmetricAlgorithm,
aead: AEADAlgorithm,
chunk_size: u64,
iv: Box<[u8]>,
) -> Result<Self>
pub fn new( sym_algo: SymmetricAlgorithm, aead: AEADAlgorithm, chunk_size: u64, iv: Box<[u8]>, ) -> Result<Self>
Creates a new AED1 object.
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.
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§
source§impl Marshal for AED1
impl Marshal for AED1
source§impl MarshalInto for AED1
impl MarshalInto for AED1
source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize>
source§impl PartialEq for AED1
impl PartialEq for AED1
impl Eq for AED1
impl StructuralPartialEq for AED1
Auto Trait Implementations§
impl Freeze for AED1
impl RefUnwindSafe for AED1
impl Send for AED1
impl Sync for AED1
impl Unpin for AED1
impl UnwindSafe for AED1
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)