Struct curve25519_dalek_ng::ristretto::CompressedRistretto[][src]

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

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.

Tuple Fields

0: [u8; 32]

Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Determine if two items are equal. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Numeric cast from self to T.

Performs the conversion.

Safe lossless bitwise transmute from T to Self.

Numeric cast from T to Self.

Performs the conversion.

Safe lossless bitwise transmute from self to T.

Return true if this element is the identity element of the curve.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.