Function forest_encoding::blake2b_variable[][src]

pub fn blake2b_variable(ingest: &[u8], size: usize) -> Vec<u8>
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator
Expand description

Generates blake2b hash with provided size.

Example

use forest_encoding::blake2b_variable;

let ingest: Vec<u8> = vec![];
let hash = blake2b_variable(&ingest, 20);
assert_eq!(hash.len(), 20);