Function unc_primitives_core::hash::hash

source ·
pub fn hash(data: &[u8]) -> CryptoHash
Expand description

Calculates a hash of a bytes slice.

§Examples

The example below calculates the hash of the indicated data.

let data = [1, 2, 3];
let hash = unc_primitives_core::hash::hash(&data);