logo
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

Creates a new AED1 object.

Gets the symmetric algorithm.

Sets the symmetric algorithm.

Gets the AEAD algorithm.

Sets the AEAD algorithm.

Gets the chunk size.

Sets the chunk size.

Gets the size of a chunk with a digest.

Gets the initialization vector for the AEAD algorithm.

Sets the initialization vector for the AEAD algorithm.

Methods from Deref<Target = Container>

Returns a reference to this Packet’s children.

Returns None if the body is not structured.

Returns a mutable reference to this Packet’s children.

Returns None if the body is not structured.

Returns an iterator over the packet’s descendants. The descendants are visited in depth-first order.

Returns None if the body is not structured.

Returns an iterator over the packet’s immediate children.

Returns None if the body is not structured.

Gets the packet’s body.

Sets the packet’s body.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Converts to this type from the input type.

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Writes a serialized version of the specified AED packet to o.

Errors

Returns Error::InvalidOperation if this packet has children. To construct an encrypted message, use serialize::stream::Encryptor.

Exports a serialized version of the object to o. Read more

Computes the maximal length of the serialized representation. Read more

Serializes into the given buffer. Read more

Serializes the packet to a vector.

Exports into the given buffer. Read more

Exports to a vector. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.