dragoonfri 0.1.0

Fast Reed-solomon Interactive oracle proof of proximity
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use rs_merkle::Hasher;

/// Blake3-256 implementation of the [`rs_merkle::Hasher`] trait.
///
/// See documentation of crate [`blake3`].
#[derive(Clone, Copy, Debug)]
pub struct Blake3;

impl Hasher for Blake3 {
    type Hash = [u8; blake3::OUT_LEN];

    fn hash(data: &[u8]) -> Self::Hash {
        blake3::hash(data).into()
    }
}