pub fn calculate_hash<T>(data: &[u8], out_hash: &mut [T]) -> Result<()>