Skip to main content Module vectors Copy item path Source use super::Mode ; π use super::ParamType ; π use ark_ff::PrimeField; π use ark_ff::UniformRand as _; π use ark_serialize::CanonicalSerialize as _; π use mina_curves::pasta::Fp ; π use mina_poseidon::constants ; π use mina_poseidon::constants::SpongeConstants ; π use mina_poseidon::pasta ; π use mina_poseidon::pasta::FULL_ROUNDS ; π use mina_poseidon::poseidon::ArithmeticSponge as Poseidon; π use mina_poseidon::poseidon::ArithmeticSpongeParams ; π use mina_poseidon::poseidon::Sponge as _; π use num_bigint::BigUint ; π use rand::Rng ; π use serde::Serialize ; π use serde::Serialize ; π use std::io::Write ; π TestVector TestVectors generate creates a set of test vectors
Uses a custom seed if provided, otherwise uses a default fixed seed for
reproducible test vectors. The deterministic parameter (in write_es5) only
affects ES5 header generation. poseidon π Computes the poseidon hash of several field elements.
Uses the βbasicβ configuration with N states and M rounds. rand_fields π generates a vector of length field elements using the provided RNG write_es5