Function std::hash::keccak256

pub fn keccak256<T>(s: T) -> b256
where
    T: Hash,
Expand description

Returns the KECCAK-256 hash of param.

Arguments

  • s: [T] - The value to be hashed.

Returns

  • [b256] - The keccak-256 hash of the value.

Examples

use std::hash::keccak256;

fn foo() {
    let result = keccak256("Fuel");
    assert(result == 0x4375c8bcdc904e5f51752581202ae9ae2bb6eddf8de05d5567d9a6b0ae4789ad);
}