Struct curve25519_dalek::ristretto::CompressedRistretto
source · 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§
source§impl CompressedRistretto
impl CompressedRistretto
sourcepub fn from_slice(bytes: &[u8]) -> CompressedRistretto
pub fn from_slice(bytes: &[u8]) -> CompressedRistretto
Construct a CompressedRistretto
from a slice of bytes.
Panics
If the input bytes
slice does not have a length of 32.
sourcepub fn decompress(&self) -> Option<RistrettoPoint>
pub fn decompress(&self) -> Option<RistrettoPoint>
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§
source§impl Clone for CompressedRistretto
impl Clone for CompressedRistretto
source§fn clone(&self) -> CompressedRistretto
fn clone(&self) -> CompressedRistretto
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ConstantTimeEq for CompressedRistretto
impl ConstantTimeEq for CompressedRistretto
source§impl Debug for CompressedRistretto
impl Debug for CompressedRistretto
source§impl Default for CompressedRistretto
impl Default for CompressedRistretto
source§fn default() -> CompressedRistretto
fn default() -> CompressedRistretto
Returns the “default value” for a type. Read more
source§impl Hash for CompressedRistretto
impl Hash for CompressedRistretto
source§impl Identity for CompressedRistretto
impl Identity for CompressedRistretto
source§fn identity() -> CompressedRistretto
fn identity() -> CompressedRistretto
Returns the identity element of the curve.
Can be used as a constructor. Read more
source§impl PartialEq<CompressedRistretto> for CompressedRistretto
impl PartialEq<CompressedRistretto> for CompressedRistretto
source§fn eq(&self, other: &CompressedRistretto) -> bool
fn eq(&self, other: &CompressedRistretto) -> bool
source§impl Zeroize for CompressedRistretto
impl Zeroize for CompressedRistretto
impl Copy for CompressedRistretto
impl Eq for CompressedRistretto
impl StructuralEq for CompressedRistretto
impl StructuralPartialEq for CompressedRistretto
Auto Trait Implementations§
impl RefUnwindSafe for CompressedRistretto
impl Send for CompressedRistretto
impl Sync for CompressedRistretto
impl Unpin for CompressedRistretto
impl UnwindSafe for CompressedRistretto
Blanket Implementations§
source§impl<T> IsIdentity for Twhere
T: ConstantTimeEq + Identity,
impl<T> IsIdentity for Twhere
T: ConstantTimeEq + Identity,
source§fn is_identity(&self) -> bool
fn is_identity(&self) -> bool
Return true if this element is the identity element of the curve.