/// Generate the Pedersen hash generators.
Generate the Pedersen hash generators.
Generate the Pedersen hash generators .
fn generate_pedersen_hash_generators() -> Vec<jubjub::SubgroupPoint> {
    // 3 generators can hold 567 bits (3*63=189 per generators), should be sufficient for our use
    let pedersen_hash_generators = (0..3)
        .map(|m| {
            let mut segment_number = [0u8; 4];
            (&mut segment_number[0..4])
                .write_u32::<LittleEndian>(m)
                .unwrap();
            find_group_hash(&segment_number, PERSONALISATION_PEDERSEN_HASH_GENERATORS)
        })
        .collect::<Vec<_>>();
    // Check that the parameters are safe
    check_consistency_of_pedersen_hash_generators(pedersen_hash_generators.as_slice());
    pedersen_hash_generators
}
fn generate_pedersen_hash_generators ( ) -> Vec < jubjub :: SubgroupPoint > { // 3 generators can hold 567 bits (3*63=189 per generators), should be sufficient for our use let pedersen_hash_generators = ( 0 .. 3 ) . map ( | m | { let mut segment_number = [ 0u8 ; 4 ] ; ( & mut segment_number [ 0 .. 4 ] ) . write_u32 :: < LittleEndian > ( m ) . unwrap ( ) ; find_group_hash ( & segment_number , PERSONALISATION_PEDERSEN_HASH_GENERATORS ) } ) . collect :: < Vec < _ > > ( ) ; // Check that the parameters are safe check_consistency_of_pedersen_hash_generators ( pedersen_hash_generators . as_slice ( ) ) ; pedersen_hash_generators }
Generate the Pedersen hash generators.
Generate the Pedersen hash generators .