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]
fn to_bytes(&self) -> [u8; 32]
[src]
Copy the bytes of this CompressedRistretto
.
fn as_bytes(&self) -> &[u8; 32]
[src]
View this CompressedRistretto
as an array of bytes.
fn decompress(&self) -> Option<RistrettoPoint>
[src]
Attempt to decompress to an RistrettoPoint
.
Return
Some(RistrettoPoint)
ifself
was the canonical encoding of a point;None
ifself
was not the canonical encoding of a point.
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