pub struct SWUMap<P>(/* private fields */)
where
P: SWUConfig;
Expand description
Represents the SWU hash-to-curve map defined by P
.
Trait Implementations§
Source§impl<P> MapToCurve<Projective<P>> for SWUMap<P>where
P: SWUConfig,
impl<P> MapToCurve<Projective<P>> for SWUMap<P>where
P: SWUConfig,
Source§fn check_parameters() -> Result<(), HashToCurveError>
fn check_parameters() -> Result<(), HashToCurveError>
Checks if P
represents a valid map.
Source§fn map_to_curve(
element: <P as CurveConfig>::BaseField,
) -> Result<Affine<P>, HashToCurveError>
fn map_to_curve( element: <P as CurveConfig>::BaseField, ) -> Result<Affine<P>, HashToCurveError>
Map an arbitrary base field element to a curve point. Based on https://github.com/zcash/pasta_curves/blob/main/src/hashtocurve.rs.
Auto Trait Implementations§
impl<P> Freeze for SWUMap<P>
impl<P> RefUnwindSafe for SWUMap<P>
impl<P> Send for SWUMap<P>
impl<P> Sync for SWUMap<P>
impl<P> Unpin for SWUMap<P>
impl<P> UnwindSafe for SWUMap<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more