p3_poseidon2

Function add_rc_and_sbox_generic

Source
pub fn add_rc_and_sbox_generic<AF: AbstractField, const D: u64>(
    val: &mut AF,
    rc: AF::F,
)
Expand description

A generic method performing the transformation:

s -> (s + rc)^D

This is a little slower than field specific implementations (particularly for packed fields) so should only be used in non performance critical places.