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

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]

Copy the bytes of this CompressedRistretto.

View this CompressedRistretto as an array of bytes.

Construct a CompressedRistretto from a slice of bytes.

Panics

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

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 Copy for CompressedRistretto
[src]

impl Clone for CompressedRistretto
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for CompressedRistretto
[src]

impl PartialEq for CompressedRistretto
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Identity for CompressedRistretto
[src]

Returns the identity element of the curve. Can be used as a constructor. Read more

impl Default for CompressedRistretto
[src]

Returns the "default value" for a type. Read more

impl Debug for CompressedRistretto
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations