Skip to main content

ToEncodedPoint

Trait ToEncodedPoint 

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§

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>

§

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

§

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

§

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

Implementors§

§

impl ToEncodedPoint<Secp256k1> for airbender_crypto::k256::AffinePoint

§

impl ToEncodedPoint<Secp256k1> for airbender_crypto::k256::ProjectivePoint

§

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

Available on crate feature sec1 only.