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