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 insteadExpand 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<()>
AeadInOut::encrypt_in_place insteadEncrypt 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>>
AeadInOut::encrypt_inout_detached insteadEncrypt 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<()>
AeadInOut::decrypt_in_place insteadDecrypt 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<()>
AeadInOut::decrypt_inout_detached insteadDecrypt 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.