pub fn hash(data: &[u8]) -> Hash
Expand description
Calculates a hash of a bytes slice.
Type of a hash depends on a chosen crypto backend (via ...-crypto
cargo feature).
ยงExamples
The example below calculates the hash of the indicated data.
let data = [1, 2, 3];
let hash = exonum_crypto::hash(&data);