Skip to main content

aea_tools/
dictionary.rs

1use std::collections::HashMap;
2
3type Offset = u64;
4type Length = u64;
5type ClusterIndex = u32;
6type SegmentIndex = u32;
7
8type Key80 = [u8; 80];
9type Hmac32 = [u8; 32];
10
11#[derive(Default)]
12pub struct AeaDictionary {
13    pub rhek: Option<[u8; 80]>,
14    pub root_header_hmac: Option<[u8; 32]>,
15
16    pub prologue_range: Option<(Offset, Length)>,
17    pub cluster_map: HashMap<ClusterIndex, (Offset, Length, Key80, Hmac32)>,
18    pub segment_map: HashMap<(ClusterIndex, SegmentIndex), (Offset, Length, Key80, Hmac32)>,
19    pub padding_start: Option<(Offset, Length, [u8; 32])>,
20}