Skip to main content

PowAlgorithm

Trait PowAlgorithm 

Source
pub trait PowAlgorithm: Send + Sync {
    // Required methods
    fn hash(&self, data: &[u8]) -> [u8; 32];
    fn name(&self) -> &'static str;
}
Expand description

Swappable PoW hash algorithm.

Required Methods§

Source

fn hash(&self, data: &[u8]) -> [u8; 32]

Source

fn name(&self) -> &'static str

Implementors§