pub struct Context<'c, C: Cipher<'c>> {
pub cipher: &'c C,
pub dir: Direction,
pub last_block_processed: bool,
pub is_gcm_ccm: bool,
pub header_processed: bool,
pub header_len: u64,
pub payload_len: u64,
pub aad_buffer: [u8; 16],
pub aad_buffer_len: usize,
pub cr: u32,
pub iv: [u32; 4],
pub suspr: [u32; 8],
}Expand description
Stores the state of the AES peripheral for suspending/resuming operations.
Fields§
§cipher: &'c CThe cipher configuration
dir: DirectionEncryption or decryption direction
last_block_processed: boolWhether the last block has been processed
is_gcm_ccm: boolWhether this is a GCM/CCM authenticated mode
header_processed: boolWhether the header (AAD) has been processed
header_len: u64Total length of additional authenticated data
payload_len: u64Total length of payload data
aad_buffer: [u8; 16]Buffer for partial AAD blocks
aad_buffer_len: usizeNumber of bytes in AAD buffer
cr: u32Control register state
iv: [u32; 4]Initialization vector state
suspr: [u32; 8]Suspend registers for GCM/CCM
Trait Implementations§
Auto Trait Implementations§
impl<'c, C> Freeze for Context<'c, C>
impl<'c, C> RefUnwindSafe for Context<'c, C>where
C: RefUnwindSafe,
impl<'c, C> Send for Context<'c, C>where
C: Sync,
impl<'c, C> Sync for Context<'c, C>where
C: Sync,
impl<'c, C> Unpin for Context<'c, C>
impl<'c, C> UnwindSafe for Context<'c, C>where
C: RefUnwindSafe,
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