pub struct IntegrityChecker { /* private fields */ }Expand description
stores checksums of function prologues for integrity checking
Implementations§
Source§impl IntegrityChecker
impl IntegrityChecker
Sourcepub fn new(prologue_size: usize) -> Self
pub fn new(prologue_size: usize) -> Self
create new integrity checker with custom prologue size
Sourcepub fn with_default_size() -> Self
pub fn with_default_size() -> Self
create with default prologue size (32 bytes)
Sourcepub fn prologue_size(&self) -> usize
pub fn prologue_size(&self) -> usize
get configured prologue size
Sourcepub fn recorded_count(&self) -> usize
pub fn recorded_count(&self) -> usize
number of recorded functions
Sourcepub fn record_addresses(&mut self, addresses: &[usize])
pub fn record_addresses(&mut self, addresses: &[usize])
record checksums for specific addresses
Sourcepub fn record_module(&mut self, module: &Module<'_>) -> Result<usize>
pub fn record_module(&mut self, module: &Module<'_>) -> Result<usize>
record checksums for all exports in module
Sourcepub fn record_exports(
&mut self,
module: &Module<'_>,
names: &[&str],
) -> Result<usize>
pub fn record_exports( &mut self, module: &Module<'_>, names: &[&str], ) -> Result<usize>
record specific exports by name
Sourcepub fn verify_all(&self) -> Vec<usize>
pub fn verify_all(&self) -> Vec<usize>
verify all recorded functions, returning list of modified addresses
Sourcepub fn get_modified(&self) -> Vec<usize>
pub fn get_modified(&self) -> Vec<usize>
get addresses of all modified functions
Sourcepub fn is_recorded(&self, addr: usize) -> bool
pub fn is_recorded(&self, addr: usize) -> bool
check if a specific address was recorded
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IntegrityChecker
impl RefUnwindSafe for IntegrityChecker
impl Send for IntegrityChecker
impl Sync for IntegrityChecker
impl Unpin for IntegrityChecker
impl UnwindSafe for IntegrityChecker
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