pub struct HashChain {
pub prev_hash: [u8; 32],
pub event_hash: [u8; 32],
pub algorithm: HashAlgorithm,
}Expand description
Hash chain for tamper-evident event log.
Each event in the chain contains a hash of the previous event, creating an immutable, verifiable audit trail.
Fields§
§prev_hash: [u8; 32]Hash of previous event (creates chain). Genesis event has zero prev_hash.
event_hash: [u8; 32]Hash of this event (canonical serialization)
algorithm: HashAlgorithmAlgorithm used for hashing
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HashChain
impl<'de> Deserialize<'de> for HashChain
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
impl Copy for HashChain
impl Eq for HashChain
impl StructuralPartialEq for HashChain
Auto Trait Implementations§
impl Freeze for HashChain
impl RefUnwindSafe for HashChain
impl Send for HashChain
impl Sync for HashChain
impl Unpin for HashChain
impl UnwindSafe for HashChain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.