pub struct Hctr2<Aes: AesCipher> { /* private fields */ }Expand description
Generic HCTR2 cipher parameterized by AES key size.
Implementations§
Source§impl<Aes: AesCipher> Hctr2<Aes>
impl<Aes: AesCipher> Hctr2<Aes>
Sourcepub const KEY_LENGTH: usize = Aes::KEY_LEN
pub const KEY_LENGTH: usize = Aes::KEY_LEN
Encryption key length in bytes.
Sourcepub const BLOCK_LENGTH: usize = BLOCK_LENGTH
pub const BLOCK_LENGTH: usize = BLOCK_LENGTH
AES block length in bytes (always 16).
Sourcepub const MIN_INPUT_LENGTH: usize = BLOCK_LENGTH
pub const MIN_INPUT_LENGTH: usize = BLOCK_LENGTH
Minimum input length in bytes.
Sourcepub fn encrypt(
&self,
plaintext: &[u8],
tweak: &[u8],
ciphertext: &mut [u8],
) -> Result<(), Error>
pub fn encrypt( &self, plaintext: &[u8], tweak: &[u8], ciphertext: &mut [u8], ) -> Result<(), Error>
Auto Trait Implementations§
impl<Aes> Freeze for Hctr2<Aes>
impl<Aes> RefUnwindSafe for Hctr2<Aes>
impl<Aes> Send for Hctr2<Aes>
impl<Aes> Sync for Hctr2<Aes>
impl<Aes> Unpin for Hctr2<Aes>
impl<Aes> UnwindSafe for Hctr2<Aes>
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