pub struct AesGcm<'c, const KEY_SIZE: usize> { /* private fields */ }
Expand description
AES-GCM Cipher Mode
Implementations§
Trait Implementations§
Source§impl<'c, const KEY_SIZE: usize> Cipher<'c> for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Cipher<'c> for AesGcm<'c, KEY_SIZE>
Source§const BLOCK_SIZE: usize = 16usize
const BLOCK_SIZE: usize = 16usize
Processing block size. Determined by the processor and the algorithm.
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 init_phase_blocking<T: Instance, DmaIn, DmaOut>(
&self,
p: Cryp,
_cryp: &Cryp<'_, T, DmaIn, DmaOut>,
)
fn init_phase_blocking<T: Instance, DmaIn, DmaOut>( &self, p: Cryp, _cryp: &Cryp<'_, T, DmaIn, DmaOut>, )
Performs any cipher-specific initialization.
Source§async fn init_phase<T: Instance, DmaIn, DmaOut>(
&self,
p: Cryp,
_cryp: &mut Cryp<'_, T, DmaIn, DmaOut>,
)
async fn init_phase<T: Instance, DmaIn, DmaOut>( &self, p: Cryp, _cryp: &mut Cryp<'_, T, DmaIn, DmaOut>, )
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: Instance, DmaIn, DmaOut>(
&self,
p: Cryp,
cryp: &Cryp<'_, T, DmaIn, DmaOut>,
dir: Direction,
int_data: &mut [u8; 16],
_temp1: [u32; 4],
padding_mask: [u8; 16],
)
fn post_final_blocking<T: Instance, DmaIn, DmaOut>( &self, p: Cryp, cryp: &Cryp<'_, T, DmaIn, DmaOut>, 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: Instance, DmaIn, DmaOut>(
&self,
p: Cryp,
cryp: &mut Cryp<'_, T, DmaIn, DmaOut>,
dir: Direction,
int_data: &mut [u8; 16],
_temp1: [u32; 4],
padding_mask: [u8; 16],
)
async fn post_final<T: Instance, DmaIn, DmaOut>( &self, p: Cryp, cryp: &mut Cryp<'_, T, DmaIn, DmaOut>, 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§const REQUIRES_PADDING: bool = false
const REQUIRES_PADDING: bool = false
Indicates whether the cipher requires the application to provide padding.
If
true
, no partial blocks will be accepted (a panic will occur).Source§fn prepare_key(&self, _p: Cryp)
fn prepare_key(&self, _p: Cryp)
Performs any key preparation within the processor, if necessary.
Source§fn get_header_block(&self) -> &[u8]
fn get_header_block(&self) -> &[u8]
Returns the AAD header block as required by the cipher.
Source§impl<'c, const KEY_SIZE: usize> CipherAuthenticated<16> for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> CipherAuthenticated<16> for AesGcm<'c, KEY_SIZE>
impl<'c> CipherSized for AesGcm<'c, { _ }>
impl<'c> CipherSized for AesGcm<'c, { _ }>
impl<'c> CipherSized for AesGcm<'c, { _ }>
impl<'c, const KEY_SIZE: usize> IVSized for AesGcm<'c, KEY_SIZE>
Auto Trait Implementations§
impl<'c, const KEY_SIZE: usize> Freeze for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> RefUnwindSafe for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Send for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Sync for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> Unpin for AesGcm<'c, KEY_SIZE>
impl<'c, const KEY_SIZE: usize> UnwindSafe for AesGcm<'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