Struct tomcrypt::EaxState
[−]
[src]
pub struct EaxState(_);
Authenticated encryption mode.
Methods
impl EaxState
[src]
fn new(
cipher: Cipher,
key: &[u8],
nonce: &[u8],
header: Option<&[u8]>
) -> Result<Self>
[src]
cipher: Cipher,
key: &[u8],
nonce: &[u8],
header: Option<&[u8]>
) -> Result<Self>
Create a new eax mode state from a key and a nonce.
The header parameter optionally contains (public) data, that will influence the generated authentication tag (also called mac).
fn encrypt_in_place(&mut self, data: &mut [u8]) -> Result<()>
[src]
Encrypts the given data in place.
fn decrypt_in_place(&mut self, data: &mut [u8]) -> Result<()>
[src]
Decrypts the given data in place.
fn finish(self, tag_len: usize) -> Result<Vec<u8>>
[src]
Generate the authentication tag (mac) with the given length.