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<()>;
}use AeadInOut instead
Expand description
Legacy in-place stateless AEAD trait.
NOTE: deprecated! Please migrate to AeadInOut.
Required Methodsยง
Sourcefn 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
fn encrypt_in_place( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<()>
use AeadInOut::encrypt_in_place instead
Encrypt the given buffer containing a plaintext message in-place.
Sourcefn 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
fn encrypt_in_place_detached( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut [u8], ) -> Result<Tag<Self>>
use AeadInOut::encrypt_inout_detached instead
Encrypt the data in-place, returning the authentication tag
Sourcefn 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
fn decrypt_in_place( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<()>
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.
Sourcefn 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
fn decrypt_in_place_detached( &self, nonce: &Nonce<Self>, associated_data: &[u8], buffer: &mut [u8], tag: &Tag<Self>, ) -> Result<()>
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".