pub trait SessionFieldElement {
// Required methods
fn random_for_session<R: CryptoRng + RngCore>(
rng: &mut R,
element_type: SessionFeType,
) -> FieldElement;
fn is_valid_for_session(&self, element_type: SessionFeType) -> bool;
}Expand description
Allows field element generation for Session Proofs
Required Methods§
Sourcefn random_for_session<R: CryptoRng + RngCore>(
rng: &mut R,
element_type: SessionFeType,
) -> FieldElement
fn random_for_session<R: CryptoRng + RngCore>( rng: &mut R, element_type: SessionFeType, ) -> FieldElement
Generate a randomized field element with a specific prefix used
only for Session Proofs. See SessionFeType for details.
Sourcefn is_valid_for_session(&self, element_type: SessionFeType) -> bool
fn is_valid_for_session(&self, element_type: SessionFeType) -> bool
Returns whether a Field Element is valid for Session Proof use, i.e. it has the right prefix
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.