pub struct RichHeaderInfo<'data> {
pub offset: usize,
pub length: usize,
pub xor_key: u32,
/* private fields */
}
Expand description
Parsed information about a Rich Header.
Fields
offset: usize
The offset at which the rich header starts.
length: usize
The length (in bytes) of the rich header.
This includes the payload, but also the 16-byte start sequence and the 8-byte final “Rich” and XOR key.
xor_key: u32
The XOR key used to mask the rich header.
Unless the file has been tampered with, it should be equal to a checksum of the file header.
Implementations
sourceimpl<'data> RichHeaderInfo<'data>
impl<'data> RichHeaderInfo<'data>
sourcepub fn parse<R: ReadRef<'data>>(data: R, nt_header_offset: u64) -> Option<Self>
pub fn parse<R: ReadRef<'data>>(data: R, nt_header_offset: u64) -> Option<Self>
Try to locate a rich header and its entries in the current PE file.
sourcepub fn unmasked_entries(&self) -> impl Iterator<Item = RichHeaderEntry> + 'data
pub fn unmasked_entries(&self) -> impl Iterator<Item = RichHeaderEntry> + 'data
Returns an iterator over the unmasked entries.
Trait Implementations
sourceimpl<'data> Clone for RichHeaderInfo<'data>
impl<'data> Clone for RichHeaderInfo<'data>
sourcefn clone(&self) -> RichHeaderInfo<'data>
fn clone(&self) -> RichHeaderInfo<'data>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'data> Debug for RichHeaderInfo<'data>
impl<'data> Debug for RichHeaderInfo<'data>
impl<'data> Copy for RichHeaderInfo<'data>
Auto Trait Implementations
impl<'data> RefUnwindSafe for RichHeaderInfo<'data>
impl<'data> Send for RichHeaderInfo<'data>
impl<'data> Sync for RichHeaderInfo<'data>
impl<'data> Unpin for RichHeaderInfo<'data>
impl<'data> UnwindSafe for RichHeaderInfo<'data>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more