felt252 as hash state, used for backwards compatibility.
NOTE: Implement Hash instead of this trait if possible.
Signature
Trait functions
hash
Takes afelt252 state and a value of type T and returns the hash result.
felt252 as hash state, used for backwards compatibility.
NOTE: Implement Hash instead of this trait if possible.
pub trait LegacyHash
felt252 state and a value of type T and returns the hash result.
fn hash(state: felt252, value: T) -> felt252
use core::pedersen::PedersenTrait;
use core::hash::LegacyHash;
let hash = LegacyHash::hash(0, 1);
Was this page helpful?