Skip to main content

BlockHasher

Trait BlockHasher 

Source
pub trait BlockHasher {
    // Required methods
    fn create() -> Self;
    fn hash(&mut self, input: &[u8]) -> &[u8] ;
    fn size() -> usize;
}
Expand description

Generate a hash from arbitrary amount of input data

Used by DataBlock to verify data integrity

Required Methods§

Source

fn create() -> Self

Create an instance

Source

fn hash(&mut self, input: &[u8]) -> &[u8]

Generate hash from input

Source

fn size() -> usize

Size of hash

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§