pub fn hash(data: &[u8], algorithm: HashAlgorithm) -> Vec<u8> ⓘ
Compute hash of data using the specified algorithm.