[−][src]Struct elliptic_curve::weierstrass::point::CompressedPoint
This is supported on
feature="weierstrass"
only.Compressed elliptic curve points serialized according to the
Elliptic-Curve-Point-to-Octet-String
algorithm.
See section 2.3.3 of SEC 1: Elliptic Curve Cryptography (Version 2.0):
Implementations
impl<C> CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
pub fn from_affine_coords(x: &ElementBytes<C>, y: &ElementBytes<C>) -> Self
[src]
This is supported on
feature="weierstrass"
only.Compress and serialize an elliptic curve point from its affine coordinates
pub fn from_bytes<B>(into_bytes: B) -> Option<Self> where
B: Into<GenericArray<u8, CompressedPointSize<C>>>,
[src]
B: Into<GenericArray<u8, CompressedPointSize<C>>>,
This is supported on
feature="weierstrass"
only.Create a new compressed elliptic curve point
pub fn as_bytes(&self) -> &[u8]
[src]
This is supported on
feature="weierstrass"
only.Borrow byte slice containing compressed curve point
pub fn into_bytes(self) -> GenericArray<u8, CompressedPointSize<C>>
[src]
This is supported on
feature="weierstrass"
only.Obtain owned array containing compressed curve point
Trait Implementations
impl<C> AsRef<[u8]> for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
impl<C> Clone for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Curve> Copy for CompressedPoint<C> where
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
<CompressedPointSize<C> as ArrayLength<u8>>::ArrayType: Copy,
[src]
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
<CompressedPointSize<C> as ArrayLength<u8>>::ArrayType: Copy,
impl<C: Eq> Eq for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
impl<C> From<CompressedPoint<C>> for PublicKey<C> where
C: Curve,
C::ElementSize: Add<U1>,
<C::ElementSize as Add>::Output: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
UncompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
<C::ElementSize as Add>::Output: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
UncompressedPointSize<C>: ArrayLength<u8>,
fn from(point: CompressedPoint<C>) -> Self
[src]
impl<C: Hash> Hash for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<C: Ord> Ord for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
fn cmp(&self, other: &CompressedPoint<C>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<C: PartialEq> PartialEq<CompressedPoint<C>> for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
fn eq(&self, other: &CompressedPoint<C>) -> bool
[src]
fn ne(&self, other: &CompressedPoint<C>) -> bool
[src]
impl<C: PartialOrd> PartialOrd<CompressedPoint<C>> for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
fn partial_cmp(&self, other: &CompressedPoint<C>) -> Option<Ordering>
[src]
fn lt(&self, other: &CompressedPoint<C>) -> bool
[src]
fn le(&self, other: &CompressedPoint<C>) -> bool
[src]
fn gt(&self, other: &CompressedPoint<C>) -> bool
[src]
fn ge(&self, other: &CompressedPoint<C>) -> bool
[src]
impl<C> StructuralEq for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
impl<C> StructuralPartialEq for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
impl<C> Zeroize for CompressedPoint<C> where
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
[src]
C: Curve,
C::ElementSize: Add<U1>,
CompressedPointSize<C>: ArrayLength<u8>,
Auto Trait Implementations
impl<C> RefUnwindSafe for CompressedPoint<C> where
<<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<C> Send for CompressedPoint<C>
impl<C> Sync for CompressedPoint<C>
impl<C> Unpin for CompressedPoint<C> where
<<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
<<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
impl<C> UnwindSafe for CompressedPoint<C> where
<<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
<<<C as Curve>::ElementSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<Z> Zeroize for Z where
Z: DefaultIsZeroes,
[src]
Z: DefaultIsZeroes,