Skip to content

Commit c18f777

Browse files
authored
chore: add poseidon_permute_comp back (#654)
1 parent dbe467e commit c18f777

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

starknet-crypto/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ pub use starknet_types_core::felt::Felt;
3535

3636
pub use pedersen_hash::pedersen_hash;
3737

38-
pub use poseidon_hash::{poseidon_hash, poseidon_hash_many, poseidon_hash_single, PoseidonHasher};
38+
pub use poseidon_hash::{
39+
poseidon_hash, poseidon_hash_many, poseidon_hash_single, poseidon_permute_comp, PoseidonHasher,
40+
};
3941

4042
pub use ecdsa::{get_public_key, recover, sign, verify, ExtendedSignature, Signature};
4143

starknet-crypto/src/poseidon_hash.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ pub fn poseidon_hash_many<'a, I: IntoIterator<Item = &'a Felt>>(msgs: I) -> Felt
9797
state[0]
9898
}
9999

100+
/// Poseidon permutation function.
101+
pub fn poseidon_permute_comp(state: &mut [Felt; 3]) {
102+
Poseidon::hades_permutation(state)
103+
}
104+
100105
#[cfg(test)]
101106
mod tests {
102107
use starknet_types_core::hash::StarkHash;

0 commit comments

Comments
 (0)