pub trait FromSec1Point<C>{
// Required method
fn from_sec1_point(point: &Sec1Point<C>) -> CtOption<Self>;
// Provided methods
fn from_sec1_bytes(bytes: &[u8]) -> Result<Self> { ... }
fn from_encoded_point(point: &Sec1Point<C>) -> CtOption<Self> { ... }
}Expand description
Decode curve point using the Octet-String-to-Elliptic-Curve-Point conversion described in
SEC 1: Elliptic Curve Cryptography (Version 2.0)
§2.3.4 (page 11).
Required Methods§
Sourcefn from_sec1_point(point: &Sec1Point<C>) -> CtOption<Self>
fn from_sec1_point(point: &Sec1Point<C>) -> CtOption<Self>
Decode curve point from a SEC1 Sec1Point.
Provided Methods§
Sourcefn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
fn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
Decode curve point from the provided SEC1 encoding (compressed, uncompressed, or
identity) using the Octet-String-to-Elliptic-Curve-Point conversion.
§Errors
- if
bytesdoes not begin with a valid SEC1 tag - if
bytesis not the appropriate length for its SEC1 tag - if
bytesdoes not encode the coordinate(s) of a valid elliptic curve point
Sourcefn from_encoded_point(point: &Sec1Point<C>) -> CtOption<Self>
👎Deprecated since 0.14.0: use FromSec1Point::from_sec1_point instead
fn from_encoded_point(point: &Sec1Point<C>) -> CtOption<Self>
FromSec1Point::from_sec1_point insteadDEPRECATED: legacy name for FromSec1Point::from_sec1_point.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<C> FromSec1Point<C> for PublicKey<C>where
C: CurveArithmetic,
AffinePoint<C>: FromSec1Point<C> + ToSec1Point<C>,
FieldBytesSize<C>: ModulusSize,
Available on crate feature
sec1 only.