Skip to main content

AeadInPlace

Trait AeadInPlace 

Source
pub trait AeadInPlace: AeadCore {
    // Required methods
    fn encrypt_in_place(
        &self,
        nonce: &Nonce<Self>,
        associated_data: &[u8],
        buffer: &mut dyn Buffer,
    ) -> Result<()>;
    fn encrypt_in_place_detached(
        &self,
        nonce: &Nonce<Self>,
        associated_data: &[u8],
        buffer: &mut [u8],
    ) -> Result<Tag<Self>>;
    fn decrypt_in_place(
        &self,
        nonce: &Nonce<Self>,
        associated_data: &[u8],
        buffer: &mut dyn Buffer,
    ) -> Result<()>;
    fn decrypt_in_place_detached(
        &self,
        nonce: &Nonce<Self>,
        associated_data: &[u8],
        buffer: &mut [u8],
        tag: &Tag<Self>,
    ) -> Result<()>;
}
๐Ÿ‘ŽDeprecated since 0.6.0: use AeadInOut instead
Expand description

Legacy in-place stateless AEAD trait.

NOTE: deprecated! Please migrate to AeadInOut.

Required Methodsยง

Source

fn encrypt_in_place( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<()>

๐Ÿ‘ŽDeprecated since 0.6.0: use AeadInOut::encrypt_in_place instead

Encrypt the given buffer containing a plaintext message in-place.

Source

fn encrypt_in_place_detached( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut [u8], ) -> Result<Tag<Self>>

๐Ÿ‘ŽDeprecated since 0.6.0: use AeadInOut::encrypt_inout_detached instead

Encrypt the data in-place, returning the authentication tag

Source

fn decrypt_in_place( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<()>

๐Ÿ‘ŽDeprecated since 0.6.0: use AeadInOut::decrypt_in_place instead

Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext.

Source

fn decrypt_in_place_detached( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut [u8], tag: &Tag<Self>, ) -> Result<()>

๐Ÿ‘ŽDeprecated since 0.6.0: use AeadInOut::decrypt_inout_detached instead

Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic)

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementorsยง