pub struct Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,{ /* private fields */ }Expand description
Trait Implementations§
Source§impl<C, M, N> AeadCore for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
impl<C, M, N> AeadCore for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
Source§const TAG_POSITION: TagPosition = TagPosition::Postfix
const TAG_POSITION: TagPosition = TagPosition::Postfix
The AEAD tag position.
Source§impl<C, M, N> AeadInOut for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
impl<C, M, N> AeadInOut for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
Source§fn encrypt_inout_detached(
&self,
nonce: &Nonce<N>,
adata: &[u8],
buffer: InOutBuf<'_, '_, u8>,
) -> Result<Tag<Self::TagSize>, Error>
fn encrypt_inout_detached( &self, nonce: &Nonce<N>, adata: &[u8], buffer: InOutBuf<'_, '_, u8>, ) -> Result<Tag<Self::TagSize>, Error>
Source§fn decrypt_inout_detached(
&self,
nonce: &Nonce<N>,
adata: &[u8],
buffer: InOutBuf<'_, '_, u8>,
tag: &Tag<Self::TagSize>,
) -> Result<(), Error>
fn decrypt_inout_detached( &self, nonce: &Nonce<N>, adata: &[u8], buffer: InOutBuf<'_, '_, u8>, tag: &Tag<Self::TagSize>, ) -> Result<(), Error>
Source§impl<C, M, N> Clone for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + Clone,
M: ArraySize + TagSize + Clone,
N: ArraySize + NonceSize + Clone,
impl<C, M, N> Clone for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + Clone,
M: ArraySize + TagSize + Clone,
N: ArraySize + NonceSize + Clone,
Source§impl<C, M, N> Debug for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
impl<C, M, N> Debug for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
Source§impl<C, M, N> From<C> for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
impl<C, M, N> From<C> for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
Source§impl<C, M, N> KeyInit for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
impl<C, M, N> KeyInit for Ccm<C, M, N>where
C: BlockSizeUser<BlockSize = U16> + BlockCipherEncrypt + KeyInit,
M: ArraySize + TagSize,
N: ArraySize + NonceSize,
Source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key. Read more
Auto Trait Implementations§
impl<C, M, N> Freeze for Ccm<C, M, N>where
C: Freeze,
impl<C, M, N> RefUnwindSafe for Ccm<C, M, N>
impl<C, M, N> Send for Ccm<C, M, N>
impl<C, M, N> Sync for Ccm<C, M, N>
impl<C, M, N> Unpin for Ccm<C, M, N>
impl<C, M, N> UnsafeUnpin for Ccm<C, M, N>where
C: UnsafeUnpin,
impl<C, M, N> UnwindSafe for Ccm<C, M, N>
Blanket Implementations§
Source§impl<T> Aead for Twhere
T: AeadInOut,
impl<T> Aead for Twhere
T: AeadInOut,
Source§impl<T> AeadInPlace for Twhere
T: AeadInOut,
impl<T> AeadInPlace for Twhere
T: AeadInOut,
Source§fn encrypt_in_place(
&self,
nonce: &Array<u8, <T as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer,
) -> Result<(), Error>
fn encrypt_in_place( &self, nonce: &Array<u8, <T as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<(), Error>
👎Deprecated since 0.6.0:
use AeadInOut::encrypt_in_place instead
Encrypt the given buffer containing a plaintext message in-place.
Source§fn encrypt_in_place_detached(
&self,
nonce: &Array<u8, <T as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
) -> Result<Array<u8, <T as AeadCore>::TagSize>, Error>
fn encrypt_in_place_detached( &self, nonce: &Array<u8, <T as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut [u8], ) -> Result<Array<u8, <T as AeadCore>::TagSize>, Error>
👎Deprecated since 0.6.0:
use AeadInOut::encrypt_inout_detached instead
Encrypt the data in-place, returning the authentication tag
Source§fn decrypt_in_place(
&self,
nonce: &Array<u8, <T as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer,
) -> Result<(), Error>
fn decrypt_in_place( &self, nonce: &Array<u8, <T as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<(), Error>
👎Deprecated since 0.6.0:
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.
Source§fn decrypt_in_place_detached(
&self,
nonce: &Array<u8, <T as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &Array<u8, <T as AeadCore>::TagSize>,
) -> Result<(), Error>
fn decrypt_in_place_detached( &self, nonce: &Array<u8, <T as AeadCore>::NonceSize>, associated_data: &[u8], buffer: &mut [u8], tag: &Array<u8, <T as AeadCore>::TagSize>, ) -> Result<(), Error>
👎Deprecated since 0.6.0:
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)
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