Struct curve25519_dalek::ristretto::CompressedRistretto
[−]
[src]
pub struct CompressedRistretto(pub [u8; 32]);
A point serialized using Mike Hamburg's Ristretto scheme.
XXX think about how this API should work
Methods
impl CompressedRistretto
[src]
The result of compressing a RistrettoPoint
.
fn to_bytes(&self) -> [u8; 32]
[src]
Convert this CompressedRistretto
to its underlying array of bytes.
fn as_bytes<'a>(&'a self) -> &'a [u8; 32]
[src]
View this CompressedRistretto
as an array of bytes.
fn decompress(&self) -> Option<RistrettoPoint>
[src]
Attempt to decompress to an RistrettoPoint
.
This function executes in constant time for all valid inputs. Inputs which do not decode to a RistrettoPoint may return early.
Trait Implementations
impl Copy for CompressedRistretto
[src]
impl Clone for CompressedRistretto
[src]
fn clone(&self) -> CompressedRistretto
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for CompressedRistretto
[src]
impl PartialEq for CompressedRistretto
[src]
fn eq(&self, __arg_0: &CompressedRistretto) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CompressedRistretto) -> bool
[src]
This method tests for !=
.
impl Identity for CompressedRistretto
[src]
fn identity() -> CompressedRistretto
[src]
Returns the identity element of the curve. Can be used as a constructor. Read more