lssa/sc_core/src/cryptography.rs
Rostyslav Tyshko d48924ed01 rm unused
2025-04-18 08:15:21 -04:00

12 lines
283 B
Rust

use ark_bn254::Fr;
use light_poseidon::{Poseidon, PoseidonBytesHasher};
#[allow(unused)]
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)
}