pub trait ToEncodedPoint<C>{
// Required method
fn to_encoded_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize>;
}Expand description
Trait for serializing a value to a SEC1 encoded curve point.
This is intended for use with the AffinePoint type for a given elliptic curve.
Required Methods§
Sourcefn to_encoded_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize>
fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Serialize this value as a SEC1 EncodedPoint, optionally applying
point compression.
Implementations on Foreign Types§
Source§impl<C> ToEncodedPoint<C> for AffinePoint<C>where
C: PrimeCurveParams,
<C as Curve>::FieldBytesSize: ModulusSize,
GenericArray<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>: Copy,
<<<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize as ArrayLength<u8>>::ArrayType: Copy,
impl<C> ToEncodedPoint<C> for AffinePoint<C>where
C: PrimeCurveParams,
<C as Curve>::FieldBytesSize: ModulusSize,
GenericArray<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>: Copy,
<<<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize as ArrayLength<u8>>::ArrayType: Copy,
fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Source§impl<C> ToEncodedPoint<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
<C as Curve>::FieldBytesSize: ModulusSize,
GenericArray<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>: Copy,
<<<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize as ArrayLength<u8>>::ArrayType: Copy,
impl<C> ToEncodedPoint<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
<C as Curve>::FieldBytesSize: ModulusSize,
GenericArray<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>: Copy,
<<<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize as ArrayLength<u8>>::ArrayType: Copy,
fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
Implementors§
impl<C> ToEncodedPoint<C> for PublicKey<C>where
C: CurveArithmetic,
<C as CurveArithmetic>::AffinePoint: FromEncodedPoint<C> + ToEncodedPoint<C>,
<C as Curve>::FieldBytesSize: ModulusSize,
Available on crate feature
sec1 only.