[−][src]Struct elliptic_curve::weierstrass::point::CompressedCurvePoint
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: Curve> CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
pub fn from_bytes<B>(into_bytes: B) -> Option<Self> where
B: Into<GenericArray<u8, CompressedPointSize<C::ScalarSize>>>,
[src]
B: Into<GenericArray<u8, CompressedPointSize<C::ScalarSize>>>,
Create a new compressed elliptic curve point
pub fn as_bytes(&self) -> &[u8]
[src]
Borrow byte slice containing compressed curve point
pub fn into_bytes(self) -> GenericArray<u8, CompressedPointSize<C::ScalarSize>>
[src]
Obtain owned array containing compressed curve point
Trait Implementations
impl<C: Curve> AsRef<[u8]> for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
impl<C: Curve> Clone for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Curve> Copy for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
<CompressedPointSize<C::ScalarSize> as ArrayLength<u8>>::ArrayType: Copy,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
<CompressedPointSize<C::ScalarSize> as ArrayLength<u8>>::ArrayType: Copy,
impl<C: Eq + Curve> Eq for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: Eq,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: Eq,
impl<C: Curve> From<CompressedCurvePoint<C>> for PublicKey<C> where
<C::ScalarSize as Add>::Output: Add<U1>,
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
UncompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
[src]
<C::ScalarSize as Add>::Output: Add<U1>,
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
UncompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
fn from(point: CompressedCurvePoint<C>) -> Self
[src]
impl<C: Hash + Curve> Hash for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: Hash,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: Hash,
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 + Curve> Ord for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: Ord,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: Ord,
fn cmp(&self, other: &CompressedCurvePoint<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 + Curve> PartialEq<CompressedCurvePoint<C>> for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: PartialEq,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: PartialEq,
fn eq(&self, other: &CompressedCurvePoint<C>) -> bool
[src]
fn ne(&self, other: &CompressedCurvePoint<C>) -> bool
[src]
impl<C: PartialOrd + Curve> PartialOrd<CompressedCurvePoint<C>> for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: PartialOrd,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
C::ScalarSize: PartialOrd,
fn partial_cmp(&self, other: &CompressedCurvePoint<C>) -> Option<Ordering>
[src]
fn lt(&self, other: &CompressedCurvePoint<C>) -> bool
[src]
fn le(&self, other: &CompressedCurvePoint<C>) -> bool
[src]
fn gt(&self, other: &CompressedCurvePoint<C>) -> bool
[src]
fn ge(&self, other: &CompressedCurvePoint<C>) -> bool
[src]
impl<C: Curve> StructuralEq for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
impl<C: Curve> StructuralPartialEq for CompressedCurvePoint<C> where
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
[src]
CompressedPointSize<C::ScalarSize>: ArrayLength<u8>,
Auto Trait Implementations
impl<C> RefUnwindSafe for CompressedCurvePoint<C> where
<<<C as Curve>::ScalarSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
<<<C as Curve>::ScalarSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
impl<C> Send for CompressedCurvePoint<C> where
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
impl<C> Sync for CompressedCurvePoint<C> where
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
impl<C> Unpin for CompressedCurvePoint<C> where
<<<C as Curve>::ScalarSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
<<<C as Curve>::ScalarSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
impl<C> UnwindSafe for CompressedCurvePoint<C> where
<<<C as Curve>::ScalarSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
<<<C as Curve>::ScalarSize as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
<C as Curve>::ScalarSize: Add<UInt<UTerm, B1>>,
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>,