pub struct KnownGoodDb { /* private fields */ }Expand description
Zero-false-positive known-good file hash database.
Backed by a memory-mapped binary file containing sorted 32-byte SHA-256 hashes. Binary search provides exact matching — no probabilistic structure, making it safe for forensic exclusion decisions.
Implementations§
Source§impl KnownGoodDb
impl KnownGoodDb
Sourcepub fn open(path: &Path) -> Result<Self, KnownGoodError>
pub fn open(path: &Path) -> Result<Self, KnownGoodError>
Open a binary file containing sorted 32-byte SHA-256 hashes. File must be a multiple of 32 bytes.
Sourcepub fn is_known_good(&self, sha256: &[u8; 32]) -> bool
pub fn is_known_good(&self, sha256: &[u8; 32]) -> bool
Returns true iff the hash is present in the database.
Zero false positives — safe for forensic exclusion decisions.
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl Freeze for KnownGoodDb
impl RefUnwindSafe for KnownGoodDb
impl Send for KnownGoodDb
impl Sync for KnownGoodDb
impl Unpin for KnownGoodDb
impl UnsafeUnpin for KnownGoodDb
impl UnwindSafe for KnownGoodDb
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