pub trait ToEncodedPoint<C>where
    C: Curve,
    <C as Curve>::FieldBytesSize: ModulusSize,{
    // Required method
    fn to_encoded_point(
        &self,
        compress: bool
    ) -> EncodedPoint<<C as Curve>::FieldBytesSize>;
}
Available on crate feature sec1 only.
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§

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§

§

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>

§

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>

source§

impl ToEncodedPoint<Secp256k1> for AffinePoint

source§

fn to_encoded_point( &self, compress: bool ) -> EncodedPoint<<Secp256k1 as Curve>::FieldBytesSize>

source§

impl ToEncodedPoint<Secp256k1> for ProjectivePoint

source§

fn to_encoded_point( &self, compress: bool ) -> EncodedPoint<<Secp256k1 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,