pub struct HashChain {
pub chain: Vec<u64>,
}Expand description
A simple hash chain using a polynomial rolling hash as a stand-in for a cryptographic hash function.
h_0 = initial_value, h_{i+1} = hash(h_i || data_i)
§WARNING
The polynomial hash used here is NOT a cryptographic hash function and provides no real security. This is a structural illustration only.
Fields§
§chain: Vec<u64>The chain of hash values: chain[0] is genesis, chain[i+1] = hash(chain[i], data[i])
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HashChain
impl RefUnwindSafe for HashChain
impl Send for HashChain
impl Sync for HashChain
impl Unpin for HashChain
impl UnsafeUnpin 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