pub struct Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize, { /* private fields */ }
Expand description
Trait Implementations
sourceimpl<C, M, N> AeadCore for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
impl<C, M, N> AeadCore for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
type NonceSize = N
type NonceSize = N
The length of a nonce.
type TagSize = M
type TagSize = M
The maximum length of the nonce.
type CiphertextOverhead = UTerm
type CiphertextOverhead = UTerm
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
sourceimpl<C, M, N> AeadInPlace for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
impl<C, M, N> AeadInPlace for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
sourcefn encrypt_in_place_detached(
&self,
nonce: &Nonce<N>,
adata: &[u8],
buffer: &mut [u8]
) -> Result<Tag<Self::TagSize>, Error>
fn encrypt_in_place_detached(
&self,
nonce: &Nonce<N>,
adata: &[u8],
buffer: &mut [u8]
) -> Result<Tag<Self::TagSize>, Error>
Encrypt the data in-place, returning the authentication tag
sourcefn decrypt_in_place_detached(
&self,
nonce: &Nonce<N>,
adata: &[u8],
buffer: &mut [u8],
tag: &Tag<Self::TagSize>
) -> Result<(), Error>
fn decrypt_in_place_detached(
&self,
nonce: &Nonce<N>,
adata: &[u8],
buffer: &mut [u8],
tag: &Tag<Self::TagSize>
) -> Result<(), Error>
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) Read more
sourceimpl<C: Clone, M: Clone, N: Clone> Clone for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
impl<C: Clone, M: Clone, N: Clone> Clone for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
sourceimpl<C, M, N> From<C> for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
impl<C, M, N> From<C> for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
sourceimpl<C, M, N> KeyInit for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt + KeyInit,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
impl<C, M, N> KeyInit for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt + KeyInit,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
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.
sourceimpl<C, M, N> KeySizeUser for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt + KeyInit,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
impl<C, M, N> KeySizeUser for Ccm<C, M, N> where
C: BlockCipher + BlockSizeUser<BlockSize = U16> + BlockEncrypt + KeyInit,
M: ArrayLength<u8> + TagSize,
N: ArrayLength<u8> + NonceSize,
type KeySize = <C as KeySizeUser>::KeySize
type KeySize = <C as KeySizeUser>::KeySize
Key size in bytes.
Auto Trait Implementations
impl<C, M, N> RefUnwindSafe for Ccm<C, M, N> where
C: RefUnwindSafe,
M: RefUnwindSafe,
N: RefUnwindSafe,
impl<C, M, N> Send for Ccm<C, M, N> where
C: Send,
M: Send,
N: Send,
impl<C, M, N> Sync for Ccm<C, M, N> where
C: Sync,
M: Sync,
N: Sync,
impl<C, M, N> Unpin for Ccm<C, M, N> where
C: Unpin,
M: Unpin,
N: Unpin,
impl<C, M, N> UnwindSafe for Ccm<C, M, N> where
C: UnwindSafe,
M: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
sourceimpl<Alg> Aead for Alg where
Alg: AeadInPlace,
impl<Alg> Aead for Alg where
Alg: AeadInPlace,
sourceimpl<Alg> AeadMut for Alg where
Alg: AeadMutInPlace,
impl<Alg> AeadMut for Alg where
Alg: AeadMutInPlace,
sourceimpl<Alg> AeadMutInPlace for Alg where
Alg: AeadInPlace,
impl<Alg> AeadMutInPlace for Alg where
Alg: AeadInPlace,
sourcefn encrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
fn encrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
Encrypt the given buffer containing a plaintext message in-place. Read more
sourcefn encrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadCore>::TagSize>, Error>
fn encrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadCore>::TagSize>, Error>
Encrypt the data in-place, returning the authentication tag
sourcefn decrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
fn decrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext. Read more
sourcefn decrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadCore>::TagSize>
) -> Result<(), Error>
fn decrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadCore>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadCore>::TagSize>
) -> Result<(), Error>
Decrypt the data in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic) Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more