mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-03 13:53:12 +00:00
11 lines
270 B
Rust
11 lines
270 B
Rust
use ark_bn254::Fr;
|
|
use light_poseidon::{Poseidon, PoseidonBytesHasher};
|
|
|
|
pub fn poseidon_hash(inputs: &[&[u8]]) -> anyhow::Result<[u8; 32]> {
|
|
let mut poseidon = Poseidon::<Fr>::new_circom(2).unwrap();
|
|
|
|
let hash = poseidon.hash_bytes_be(inputs)?;
|
|
|
|
Ok(hash)
|
|
}
|