[−][src]Struct eax::Eax
EAX: generic over an underlying block cipher implementation.
This type is generic to support substituting alternative cipher implementations.
If in doubt, use the built-in [Aes128Eax
] and [Aes256Eax
] type aliases.
Trait Implementations
impl<Cipher> AeadInPlace for Eax<Cipher> where
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
[src]
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
type NonceSize = Cipher::BlockSize
The length of a nonce.
type TagSize = <Cmac<Cipher> as Mac>::OutputSize
The maximum length of the nonce.
type CiphertextOverhead = U0
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
fn encrypt_in_place_detached(
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<Tag, Error>
[src]
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<Tag, Error>
fn decrypt_in_place_detached(
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &Tag
) -> Result<(), Error>
[src]
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &Tag
) -> Result<(), Error>
fn encrypt_in_place(
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
[src]
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
fn decrypt_in_place(
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
[src]
&self,
nonce: &GenericArray<u8, Self::NonceSize>,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
impl<Cipher: Clone> Clone for Eax<Cipher> where
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
[src]
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
impl<Cipher> NewAead for Eax<Cipher> where
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
[src]
Cipher: BlockCipher<BlockSize = U16> + NewBlockCipher + Clone,
Cipher::ParBlocks: ArrayLength<Block<Cipher>>,
Auto Trait Implementations
impl<Cipher> RefUnwindSafe for Eax<Cipher> where
<<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<Cipher> Send for Eax<Cipher> where
<Cipher as NewBlockCipher>::KeySize: ArrayLength<u8>,
<Cipher as NewBlockCipher>::KeySize: ArrayLength<u8>,
impl<Cipher> Sync for Eax<Cipher> where
<Cipher as NewBlockCipher>::KeySize: ArrayLength<u8>,
<Cipher as NewBlockCipher>::KeySize: ArrayLength<u8>,
impl<Cipher> Unpin for Eax<Cipher> where
<<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: Unpin,
<<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: Unpin,
impl<Cipher> UnwindSafe for Eax<Cipher> where
<<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: UnwindSafe,
<<Cipher as NewBlockCipher>::KeySize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<Alg> Aead for Alg where
Alg: AeadInPlace,
[src]
Alg: AeadInPlace,
type NonceSize = <Alg as AeadInPlace>::NonceSize
The length of a nonce.
type TagSize = <Alg as AeadInPlace>::TagSize
The maximum length of the nonce.
type CiphertextOverhead = <Alg as AeadInPlace>::CiphertextOverhead
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
fn encrypt<'msg, 'aad>(
&self,
nonce: &GenericArray<u8, <Alg as Aead>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]
&self,
nonce: &GenericArray<u8, <Alg as Aead>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
fn decrypt<'msg, 'aad>(
&self,
nonce: &GenericArray<u8, <Alg as Aead>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]
&self,
nonce: &GenericArray<u8, <Alg as Aead>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
impl<Alg> AeadMut for Alg where
Alg: AeadMutInPlace,
[src]
Alg: AeadMutInPlace,
type NonceSize = <Alg as AeadMutInPlace>::NonceSize
The length of a nonce.
type TagSize = <Alg as AeadMutInPlace>::TagSize
The maximum length of the nonce.
type CiphertextOverhead = <Alg as AeadMutInPlace>::CiphertextOverhead
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
fn encrypt<'msg, 'aad>(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMut>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMut>::NonceSize>,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
fn decrypt<'msg, 'aad>(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMut>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMut>::NonceSize>,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
impl<Alg> AeadMutInPlace for Alg where
Alg: AeadInPlace,
[src]
Alg: AeadInPlace,
type NonceSize = <Alg as AeadInPlace>::NonceSize
The length of a nonce.
type TagSize = <Alg as AeadInPlace>::TagSize
The maximum length of the nonce.
type CiphertextOverhead = <Alg as AeadInPlace>::CiphertextOverhead
The upper bound amount of additional space required to support a ciphertext vs. a plaintext. Read more
fn encrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
fn encrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadMutInPlace>::TagSize>, Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8]
) -> Result<GenericArray<u8, <Alg as AeadMutInPlace>::TagSize>, Error>
fn decrypt_in_place(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut impl Buffer
) -> Result<(), Error>
fn decrypt_in_place_detached(
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadMutInPlace>::TagSize>
) -> Result<(), Error>
[src]
&mut self,
nonce: &GenericArray<u8, <Alg as AeadMutInPlace>::NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &GenericArray<u8, <Alg as AeadMutInPlace>::TagSize>
) -> Result<(), Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,