[][src]Struct curve25519_dalek::ristretto::CompressedRistretto

pub struct CompressedRistretto(pub [u8; 32]);

A Ristretto point, in compressed wire format.

The Ristretto encoding is canonical, so two points are equal if and only if their encodings are equal.

Methods

impl CompressedRistretto[src]

pub fn to_bytes(&self) -> [u8; 32][src]

Copy the bytes of this CompressedRistretto.

pub fn as_bytes(&self) -> &[u8; 32][src]

View this CompressedRistretto as an array of bytes.

pub fn from_slice(bytes: &[u8]) -> CompressedRistretto[src]

Construct a CompressedRistretto from a slice of bytes.

Panics

If the input bytes slice does not have a length of 32.

pub fn decompress(&self) -> Option<RistrettoPoint>[src]

Attempt to decompress to an RistrettoPoint.

Return

  • Some(RistrettoPoint) if self was the canonical encoding of a point;

  • None if self was not the canonical encoding of a point.

Trait Implementations

impl Identity for CompressedRistretto[src]

impl Clone for CompressedRistretto[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for CompressedRistretto[src]

impl PartialEq<CompressedRistretto> for CompressedRistretto[src]

impl Eq for CompressedRistretto[src]

impl Copy for CompressedRistretto[src]

impl Default for CompressedRistretto[src]

impl ConstantTimeEq for CompressedRistretto[src]

Auto Trait Implementations

impl Send for CompressedRistretto

impl Sync for CompressedRistretto

Blanket Implementations

impl<T> IsIdentity for T where
    T: ConstantTimeEq + Identity
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> FromCast for T

impl<T, U> Cast for T where
    U: FromCast<T>, 

impl<T, U> IntoBits for T where
    U: FromBits<T>, 

impl<T> FromBits for T

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Same for T

type Output = T

Should always be Self