pub(crate) struct Cipher<C>where
C: StreamCipher + StreamCipherSeek,{
cipher: C,
mac: Poly1305,
}Expand description
ChaCha20Poly1305 instantiated with a particular nonce
Fields§
§cipher: C§mac: Poly1305Implementations§
Source§impl<C> Cipher<C>where
C: StreamCipher + StreamCipherSeek,
impl<C> Cipher<C>where
C: StreamCipher + StreamCipherSeek,
Sourcepub(crate) fn encrypt_in_place_detached(
self,
associated_data: &[u8],
buffer: &mut [u8],
) -> Result<Tag, Error>
pub(crate) fn encrypt_in_place_detached( self, associated_data: &[u8], buffer: &mut [u8], ) -> Result<Tag, Error>
Encrypt the given message in-place, returning the authentication tag
Auto Trait Implementations§
impl<C> Freeze for Cipher<C>where
C: Freeze,
impl<C> RefUnwindSafe for Cipher<C>where
C: RefUnwindSafe,
impl<C> Send for Cipher<C>where
C: Send,
impl<C> Sync for Cipher<C>where
C: Sync,
impl<C> Unpin for Cipher<C>where
C: Unpin,
impl<C> UnwindSafe for Cipher<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more