pub struct Ocb<C> { /* private fields */ }Expand description
OCB3 authenticated encryption with a 16-byte detached tag.
Implementations§
Trait Implementations§
Source§impl<C: BlockCipher> Aead for Ocb<C>
impl<C: BlockCipher> Aead for Ocb<C>
Source§fn encrypt_in_place(
&self,
nonce: &[u8],
aad: &[u8],
data: &mut [u8],
) -> Self::Tag
fn encrypt_in_place( &self, nonce: &[u8], aad: &[u8], data: &mut [u8], ) -> Self::Tag
Encrypt
data in place and return its authentication tag.Source§fn decrypt_in_place(
&self,
nonce: &[u8],
aad: &[u8],
data: &mut [u8],
tag: &Self::Tag,
) -> bool
fn decrypt_in_place( &self, nonce: &[u8], aad: &[u8], data: &mut [u8], tag: &Self::Tag, ) -> bool
Decrypt
data in place after authenticating tag.Auto Trait Implementations§
impl<C> Freeze for Ocb<C>where
C: Freeze,
impl<C> RefUnwindSafe for Ocb<C>where
C: RefUnwindSafe,
impl<C> Send for Ocb<C>where
C: Send,
impl<C> Sync for Ocb<C>where
C: Sync,
impl<C> Unpin for Ocb<C>where
C: Unpin,
impl<C> UnsafeUnpin for Ocb<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Ocb<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