Open olehmisar opened 4 days ago
my_hash(input: BoundedVec<u8, N>)
may also be written as my_hash(input: impl Into<BoundedVec<u8, N>>)
, so it can accept both [u8; N]
and BoundedVec<u8, N>
.
Hey @olehmisar thanks for submitting the Issue, this is a great collection of suggestions!
The team is currently occupied with gradually moving most of the hashing schemes currently in stdlib out to standalone repos (e.g. MiMC) as a part of https://github.com/noir-lang/noir/issues/6676.
They would be more able to chime in and share thoughts then 🙌 great to continue keep track of observations here for now!
The list is not exhaustive
sha256_var(msg: [u8; N], message_size: u64)
->sha256(input: BoundedVec<u8, N>)
keccak256(input: [u8; N], message_size: u32)
->keccak256(input: BoundedVec<u8, N>)
std::hash::poseidon2(input: BoundedVec<Field, N>)
std::hash::poseidon2::Poseidon2::hash
poseidon2_permutation(_input: [Field; N], _state_length: u32)
->poseidon2_permutation(_input: BoundedVec<Field, N>)
fn sha256
andfn digest
fromstd::hash::sha256
std::sha256
andstd::sha512
modulesstd::hash::poseidon
mod tests { }
I am not sure about this:
std::hash::pedersen_hash
->std::hash::pedersen
? Can it accept aBoundedVec
?std::hash::hash_to_field
? Should it go to v1?