pub trait EncodedChallenge<C: CurveAffine> {
type Input;
// Required methods
fn new(challenge_input: &Self::Input) -> Self;
fn get_scalar(&self) -> C::Scalar;
// Provided method
fn as_challenge_scalar<T>(&self) -> ChallengeScalar<C, T> { ... }
}
Expand description
EncodedChallenge<C>
defines a challenge encoding with a Self::Input
that is used to derive the challenge encoding and get_challenge
obtains
the real C::Scalar
that the challenge encoding represents.
Required Associated Types§
Required Methods§
Sourcefn new(challenge_input: &Self::Input) -> Self
fn new(challenge_input: &Self::Input) -> Self
Get an encoded challenge from a given input challenge.
Sourcefn get_scalar(&self) -> C::Scalar
fn get_scalar(&self) -> C::Scalar
Get a scalar field element from an encoded challenge.
Provided Methods§
Sourcefn as_challenge_scalar<T>(&self) -> ChallengeScalar<C, T>
fn as_challenge_scalar<T>(&self) -> ChallengeScalar<C, T>
Cast an encoded challenge as a typed ChallengeScalar
.
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.