Skip to main content

ToSec1Point

Trait ToSec1Point 

Source
pub trait ToSec1Point<C>{
    // Required method
    fn to_sec1_point(&self, compress: bool) -> Sec1Point<C>;

    // Provided methods
    fn to_sec1_bytes(&self) -> Box<[u8]>
       where C: PointCompression { ... }
    fn to_compressed_point(&self) -> CompressedPoint<C> { ... }
    fn to_uncompressed_point(&self) -> UncompressedPoint<C> { ... }
    fn to_encoded_point(&self, compress: bool) -> Sec1Point<C> { ... }
}
Expand description

Encode curve point using the Elliptic-Curve-Point-to-Octet-String conversion described in SEC 1: Elliptic Curve Cryptography (Version 2.0) §2.3.3 (page 10).

Required Methods§

Source

fn to_sec1_point(&self, compress: bool) -> Sec1Point<C>

Serialize curve point as a SEC1 Sec1Point, optionally applying point compression according to the compress flag.

Provided Methods§

Source

fn to_sec1_bytes(&self) -> Box<[u8]>

Encode curve point using the Elliptic-Curve-Point-to-Octet-String conversion and the point compression default for this curve as specified by the PointCompression trait.

Source

fn to_compressed_point(&self) -> CompressedPoint<C>

Serialize curve point as a CompressedPoint.

Source

fn to_uncompressed_point(&self) -> UncompressedPoint<C>

Serialize curve point as a CompressedPoint.

Source

fn to_encoded_point(&self, compress: bool) -> Sec1Point<C>

👎Deprecated since 0.14.0: use ToSec1Point::to_sec1_point instead

DEPRECATED: legacy name for ToSec1Point::to_sec1_point.

Implementors§

Source§

impl<C> ToSec1Point<C> for PublicKey<C>

Available on crate feature sec1 only.