pub struct AesCtr<'c, const KEY_SIZE: usize> { /* private fields */ }Expand description
AES-CTR Cipher Mode
Implementations§
Trait Implementations§
Source§impl<'c, const KEY_SIZE: usize> Cipher<'c> for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Cipher<'c> for AesCtr<'c, KEY_SIZE>
Source§const REQUIRES_PADDING: bool = false
const REQUIRES_PADDING: bool = false
Indicates whether the cipher requires the application to provide padding.
Source§fn chmod_bits(&self) -> u8
fn chmod_bits(&self) -> u8
Returns the raw
CHMOD field value for this cipher mode.Source§const BLOCK_SIZE: usize = AES_BLOCK_SIZE
const BLOCK_SIZE: usize = AES_BLOCK_SIZE
Processing block size (always 16 bytes for AES).
Source§fn uses_gcm_phases(&self) -> bool
fn uses_gcm_phases(&self) -> bool
Indicates whether this cipher mode uses GCM/CCM phases (init, header, payload, final).
Source§fn is_ccm_mode(&self) -> bool
fn is_ccm_mode(&self) -> bool
Indicates whether this is CCM mode (which has different final phase handling).
impl<'c> CipherSized for AesCtr<'c, { _ }>
impl<'c> CipherSized for AesCtr<'c, { _ }>
Available on
cryp only.impl<'c> CipherSized for AesCtr<'c, { _ }>
Available on non-
aes_v1 only.impl<'c, const KEY_SIZE: usize> IVSized for AesCtr<'c, KEY_SIZE>
Auto Trait Implementations§
impl<'c, const KEY_SIZE: usize> Freeze for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> RefUnwindSafe for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Send for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Sync for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Unpin for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> UnsafeUnpin for AesCtr<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> UnwindSafe for AesCtr<'c, KEY_SIZE>
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
Source§impl<'c, C> Cipher<'c> for Cwhere
C: Cipher<'c>,
impl<'c, C> Cipher<'c> for Cwhere
C: Cipher<'c>,
Source§const BLOCK_SIZE: usize = const BLOCK_SIZE: usize = <C as crate::crypto::Cipher::<'c>>::BLOCK_SIZE;
const BLOCK_SIZE: usize = const BLOCK_SIZE: usize = <C as crate::crypto::Cipher::<'c>>::BLOCK_SIZE;
Processing block size. Determined by the processor and the algorithm.
Source§const REQUIRES_PADDING: bool = const REQUIRES_PADDING: bool =
<C as crate::crypto::Cipher::<'c>>::REQUIRES_PADDING;
const REQUIRES_PADDING: bool = const REQUIRES_PADDING: bool = <C as crate::crypto::Cipher::<'c>>::REQUIRES_PADDING;
Indicates whether the cipher requires the application to provide padding.
If
true, no partial blocks will be accepted (a panic will occur).Source§fn set_algomode(&self, p: Cryp)
fn set_algomode(&self, p: Cryp)
Sets the processor algorithm mode according to the associated cipher.
Source§fn prepare_key(&self, p: Cryp, dir: Direction)
fn prepare_key(&self, p: Cryp, dir: Direction)
Performs any key preparation within the processor, if necessary.
Source§fn init_phase_blocking<T, M>(&self, p: Cryp, _cryp: &Cryp<'_, T, M>)
fn init_phase_blocking<T, M>(&self, p: Cryp, _cryp: &Cryp<'_, T, M>)
Performs any cipher-specific initialization.
Source§async fn init_phase<T>(&self, p: Cryp, cryp: &mut Cryp<'_, T, Async>)where
T: Instance,
async fn init_phase<T>(&self, p: Cryp, cryp: &mut Cryp<'_, T, Async>)where
T: Instance,
Performs any cipher-specific initialization.
Source§fn pre_final(&self, p: Cryp, dir: Direction, _padding_len: usize) -> [u32; 4]
fn pre_final(&self, p: Cryp, dir: Direction, _padding_len: usize) -> [u32; 4]
Called prior to processing the last data block for cipher-specific operations.
Source§fn post_final_blocking<T, M>(
&self,
p: Cryp,
cryp: &Cryp<'_, T, M>,
dir: Direction,
int_data: &mut [u8; 16],
temp1: [u32; 4],
padding_mask: [u8; 16],
)
fn post_final_blocking<T, M>( &self, p: Cryp, cryp: &Cryp<'_, T, M>, dir: Direction, int_data: &mut [u8; 16], temp1: [u32; 4], padding_mask: [u8; 16], )
Called after processing the last data block for cipher-specific operations.
Source§async fn post_final<T>(
&self,
p: Cryp,
cryp: &mut Cryp<'_, T, Async>,
dir: Direction,
int_data: &mut [u8; 16],
temp1: [u32; 4],
padding_mask: [u8; 16],
)where
T: Instance,
async fn post_final<T>(
&self,
p: Cryp,
cryp: &mut Cryp<'_, T, Async>,
dir: Direction,
int_data: &mut [u8; 16],
temp1: [u32; 4],
padding_mask: [u8; 16],
)where
T: Instance,
Called after processing the last data block for cipher-specific operations.