Function hash

Source
pub fn hash(alg: Algorithm, payload: &[u8]) -> Vec<u8> 
Expand description

Create the digest for the given data and mode alg. The output has length [digest_size(alg)], i.e. blake2 returns a full-sized digest.

Note that this will return a vector on the heap. Use functions like sha2_256 if you want an array.