pub fn keccak256<T>(val: T) -> b256
where
T: Hash,
Expand description
Returns the KECCAK-256 hash of val.
Arguments
s: [T] - The value to be hashed.
Returns
- [b256] - The keccak-256 hash of the
val.
Examples
use std::hash::keccak256;
fn foo() {
let result = keccak256("Fuel");
assert_eq(result, 0x4375c8bcdc904e5f51752581202ae9ae2bb6eddf8de05d5567d9a6b0ae4789ad);
}