Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

ToEncodedPoint

Trait ToEncodedPoint 

Source
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§

Source

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>

Source§

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

Source§

impl<C> ToEncodedPoint<C> for ProjectivePoint<C>

Source§

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

Implementors§

Source§

impl<C> ToEncodedPoint<C> for PublicKey<C>

Available on crate feature sec1 only.