pub struct AuditLog { /* private fields */ }Expand description
Encrypted audit log with hash chain integrity.
Implementations§
Source§impl AuditLog
impl AuditLog
Sourcepub fn open(path: &Path, data_key: &SecretKey) -> Result<Self>
pub fn open(path: &Path, data_key: &SecretKey) -> Result<Self>
Open or create an audit log at the given path.
Sourcepub fn set_retention(&mut self, policy: RetentionPolicy)
pub fn set_retention(&mut self, policy: RetentionPolicy)
Set the retention policy.
Sourcepub fn log(&mut self, entry: AuditEntry, data_key: &SecretKey) -> Result<()>
pub fn log(&mut self, entry: AuditEntry, data_key: &SecretKey) -> Result<()>
Log an audit entry.
Sourcepub fn verify_chain(&self, data_key: &SecretKey) -> Result<bool>
pub fn verify_chain(&self, data_key: &SecretKey) -> Result<bool>
Verify the hash chain integrity.
Sourcepub fn apply_retention(&mut self, data_key: &SecretKey) -> Result<usize>
pub fn apply_retention(&mut self, data_key: &SecretKey) -> Result<usize>
Apply the retention policy, returning the number of entries removed.
Auto Trait Implementations§
impl Forget for AuditLog
impl Freeze for AuditLog
impl Move for AuditLog
impl RefUnwindSafe for AuditLog
impl Send for AuditLog
impl Sync for AuditLog
impl Unpin for AuditLog
impl UnsafeUnpin for AuditLog
impl UnwindSafe for AuditLog
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