Skip to content

Commit

Permalink
chore: refactor poseidon2 (#6655)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Nov 29, 2024
1 parent eec5970 commit c49d720
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions noir_stdlib/src/hash/poseidon2.nr
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ pub struct Poseidon2 {
impl Poseidon2 {
#[no_predicates]
pub fn hash<let N: u32>(input: [Field; N], message_size: u32) -> Field {
if message_size == N {
Poseidon2::hash_internal(input, N, false)
} else {
Poseidon2::hash_internal(input, message_size, true)
}
Poseidon2::hash_internal(input, message_size, message_size != N)
}

pub(crate) fn new(iv: Field) -> Poseidon2 {
Expand Down

0 comments on commit c49d720

Please sign in to comment.