sha256

To use the sha256 function we must import it.


To hash multiple values we wrap them into a tuple however other compound types may be used.

fn sha256_hashing(age: u64, name: str, status: bool) -> b256 {
    let mut hasher = Hasher::new();
    age.hash(hasher);
    hasher.write_str(name);
    status.hash(hasher);
    hasher.sha256()
}