pub struct HashChainSink { /* private fields */ }Expand description
Tamper-evident AuditSink: each record is wrapped in a ChainedRecord
whose hash folds in the previous record’s hash. Deleting, editing, or
reordering any line breaks the chain, which verify_chain detects. On
restart it resumes from the file’s last hash, so the chain spans restarts.
This is integrity (tamper-evidence), not secrecy — pair with
AuditHook::with_redactor to also keep PII out of the trail, and store the
file on append-only / WORM media for stronger guarantees.
Implementations§
Trait Implementations§
Source§impl AuditSink for HashChainSink
impl AuditSink for HashChainSink
fn record(&self, rec: &AuditRecord)
Auto Trait Implementations§
impl !Freeze for HashChainSink
impl Forget for HashChainSink
impl RefUnwindSafe for HashChainSink
impl Send for HashChainSink
impl Sync for HashChainSink
impl Unpin for HashChainSink
impl UnsafeUnpin for HashChainSink
impl UnwindSafe for HashChainSink
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