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§
Sourcefn to_sec1_point(&self, compress: bool) -> Sec1Point<C>
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§
Sourcefn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
fn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
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.
Sourcefn to_compressed_point(&self) -> CompressedPoint<C>
fn to_compressed_point(&self) -> CompressedPoint<C>
Serialize curve point as a CompressedPoint.
Sourcefn to_uncompressed_point(&self) -> UncompressedPoint<C>
fn to_uncompressed_point(&self) -> UncompressedPoint<C>
Serialize curve point as a CompressedPoint.
Sourcefn to_encoded_point(&self, compress: bool) -> Sec1Point<C>
👎Deprecated since 0.14.0: use ToSec1Point::to_sec1_point instead
fn to_encoded_point(&self, compress: bool) -> Sec1Point<C>
ToSec1Point::to_sec1_point insteadDEPRECATED: legacy name for ToSec1Point::to_sec1_point.
Implementors§
impl<C> ToSec1Point<C> for PublicKey<C>where
C: CurveArithmetic,
AffinePoint<C>: FromSec1Point<C> + ToSec1Point<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate feature
sec1 only.