pub fn keccak256<T: AsRef<[u8]>>(bytes: T) -> [u8; 32] {
    let mut output = [0u8; 32];
    let mut hasher = Keccak::v256();
    hasher.update(bytes.as_ref());
    hasher.finalize(&mut output);
    output
}
Simple interface to the [`keccak256`] hash function.

[`keccak256`]: https://en.wikipedia.org/wiki/SHA-3
patch-testing/keccak/program/src/main.rs