pub struct HashTableSegment {
pub mbn_header: MbnHeader,
pub common_metadata: Option<CommonMetadata>,
pub qti_metadata: Option<Metadata>,
pub metadata: Option<Metadata>,
pub hash_table: Vec<HashEntry>,
pub qti_signature: Vec<u8>,
pub qti_certificate_chain: Vec<u8>,
pub signature: Vec<u8>,
pub certificate_chain: Vec<u8>,
pub padding: Padding,
}
Expand description
Hash table segment representation.
Fields§
§mbn_header: MbnHeader
MBN header, including locations of fields inside hash segment.
common_metadata: Option<CommonMetadata>
Common metadata, only available if header version is greater than 7.
qti_metadata: Option<Metadata>
Information about the image supplied by QTI.
metadata: Option<Metadata>
Information about the image supplied by OEM.
hash_table: Vec<HashEntry>
Hashes of other segments in the ELF file.
qti_signature: Vec<u8>
QTI signature.
qti_certificate_chain: Vec<u8>
QTI certificate chain.
signature: Vec<u8>
OEM signature.
certificate_chain: Vec<u8>
OEM certificate chain.
padding: Padding
Padding bytes.
Implementations§
Source§impl HashTableSegment
impl HashTableSegment
Sourcepub fn parse(raw: &[u8]) -> Result<Self, ParseError>
pub fn parse(raw: &[u8]) -> Result<Self, ParseError>
Parse byte stream to hash table segment.
NOTE: The unparsed parts at the end of byte stream are considered padding.
Hint: Many *.mbn
files are actually ELF files, please parse them via from_elf()
instead of this function.
Trait Implementations§
Source§impl Clone for HashTableSegment
impl Clone for HashTableSegment
Source§fn clone(&self) -> HashTableSegment
fn clone(&self) -> HashTableSegment
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HashTableSegment
impl RefUnwindSafe for HashTableSegment
impl Send for HashTableSegment
impl Sync for HashTableSegment
impl Unpin for HashTableSegment
impl UnwindSafe for HashTableSegment
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