pub struct AuditEntry {
pub index: u64,
pub timestamp: u64,
pub action: Action,
pub proof: IntegrityProof,
pub decision: Decision,
pub prev_hash: [u8; 32],
pub current_hash: [u8; 32],
pub signature: Vec<u8>,
}Expand description
A single entry in the audit log
Each entry is cryptographically linked to the previous entry, forming a blockchain-style tamper-evident chain.
Fields§
§index: u64Sequential index (starts at 0)
timestamp: u64Unix timestamp when entry was created
action: ActionAction that was requested
proof: IntegrityProofCryptographic proof for this action
decision: DecisionDecision made (approved or denied)
prev_hash: [u8; 32]Hash of previous entry (blockchain linkage)
current_hash: [u8; 32]Hash of this entry (excluding signature)
signature: Vec<u8>RSA signature of this entire entry
Implementations§
Source§impl AuditEntry
impl AuditEntry
Sourcepub fn compute_hash(&self) -> [u8; 32]
pub fn compute_hash(&self) -> [u8; 32]
Compute the hash of this entry (for blockchain linkage)
Trait Implementations§
Source§impl Clone for AuditEntry
impl Clone for AuditEntry
Source§fn clone(&self) -> AuditEntry
fn clone(&self) -> AuditEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditEntry
impl Debug for AuditEntry
Source§impl<'de> Deserialize<'de> for AuditEntry
impl<'de> Deserialize<'de> for AuditEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuditEntry
impl RefUnwindSafe for AuditEntry
impl Send for AuditEntry
impl Sync for AuditEntry
impl Unpin for AuditEntry
impl UnwindSafe for AuditEntry
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