limit AAD to 64 bytes

This commit is contained in:
bunnie 2024-04-07 00:39:05 +08:00
parent 3079da3a57
commit 8f94ecaf6c

View file

@ -9,14 +9,15 @@ pub struct SwapDescriptor {
pub flash_offset: u32, pub flash_offset: u32,
} }
#[derive(Debug)]
#[repr(C)] #[repr(C)]
pub struct SwapSourceHeader { pub struct SwapSourceHeader {
pub version: u32, pub version: u32,
pub parital_nonce: [u8; 8], pub parital_nonce: [u8; 8],
pub mac_offset: u32, pub mac_offset: u32,
pub aad_len: u32, pub aad_len: u32,
// consumes up to the remainder of the page // aad is limited to 64 bytes!
pub aad: [u8; 4076], pub aad: [u8; 64],
} }
/// An aligned, raw-page structure /// An aligned, raw-page structure