Function std::hash::sha256

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

Returns the SHA-2-256 hash of param.

Arguments

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

Returns

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

Examples

use std::hash::*;

fn foo() {
    let result = sha256("Fuel");
    assert(result == 0xa80f942f4112036dfc2da86daf6d2ef6ede3164dd56d1000eb82fa87c992450f);
}