Function near_primitives_core::hash::hash [−][src]
pub fn hash(data: &[u8]) -> CryptoHash
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 = near_primitives_core::hash::hash(&data);