pub trait UncompressedEncoding: Sized {
type Uncompressed: Default + AsRef<[u8]> + AsMut<[u8]>;
// Required methods
fn from_uncompressed(bytes: &Self::Uncompressed) -> CtOption<Self>;
fn from_uncompressed_unchecked(bytes: &Self::Uncompressed) -> CtOption<Self>;
fn to_uncompressed(&self) -> Self::Uncompressed;
}
Expand description
Affine representation of a point on an elliptic curve that has a defined uncompressed encoding.
Required Associated Types§
Required Methods§
Sourcefn from_uncompressed(bytes: &Self::Uncompressed) -> CtOption<Self>
fn from_uncompressed(bytes: &Self::Uncompressed) -> CtOption<Self>
Attempts to deserialize an element from its uncompressed encoding.
Sourcefn from_uncompressed_unchecked(bytes: &Self::Uncompressed) -> CtOption<Self>
fn from_uncompressed_unchecked(bytes: &Self::Uncompressed) -> CtOption<Self>
Attempts to deserialize an uncompressed element, not checking if the element is in the correct subgroup.
This is dangerous to call unless you trust the bytes you are reading; otherwise,
API invariants may be broken. Please consider using
UncompressedEncoding::from_uncompressed
instead.
Sourcefn to_uncompressed(&self) -> Self::Uncompressed
fn to_uncompressed(&self) -> Self::Uncompressed
Converts this element into its uncompressed encoding, so long as it’s not the point at infinity.
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.