pub(crate) fn encrypt_in_place_detached(
        mut self,
        associated_data: &[u8],
        buffer: &mut [u8],
    ) -> Result<Tag, Error> {
        if !associated_data.is_empty() {
            return Err(Error);
        }

        // TODO(tarcieri): interleave encryption with Poly1305
        // See: <https://github.com/RustCrypto/AEADs/issues/74>
        self.cipher.apply_keystream(buffer);
        Ok(self.mac.compute_unpadded(buffer).into_bytes())
    }
/// Encrypt the given message in-place, returning the authentication tag
Encrypt the given message in-place, returning the authentication tag
Encrypt the given message in - place returning the authentication tag
pub(crate) fn encrypt_in_place_detached(
        mut self,
        associated_data: &[u8],
        buffer: &mut [u8],
    ) -> Result<Tag, Error> {
        if !associated_data.is_empty() {
            return Err(Error);
        }
        // TODO(tarcieri): interleave encryption with Poly1305
        // See: <https://github.com/RustCrypto/AEADs/issues/74>
        self.cipher.apply_keystream(buffer);
        Ok(self.mac.compute_unpadded(buffer).into_bytes())
    }
pub ( crate ) fn encrypt_in_place_detached ( mut self , associated_data : & [ u8 ] , buffer : & mut [ u8 ] , ) -> Result < Tag , Error > { if ! associated_data . is_empty ( ) { return Err ( Error ) ; } // TODO(tarcieri): interleave encryption with Poly1305 // See: <https://github.com/RustCrypto/AEADs/issues/74> self . cipher . apply_keystream ( buffer ) ; Ok ( self . mac . compute_unpadded ( buffer ) . into_bytes ( ) ) }
Encrypt the given message in-place, returning the authentication tag
Encrypt the given message in - place returning the authentication tag
mut self
associated_data
&[u8]
buffer
&mut [u8]
mut self
associated_data
&[u8]
buffer
&mut [u8]