[−][src]Struct curve25519_dalek_ng::ristretto::CompressedRistretto
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.
Implementations
impl CompressedRistretto
[src]
pub fn to_bytes(&self) -> [u8; 32]
[src]
Copy the bytes of this CompressedRistretto
.
pub fn as_bytes(&self) -> &[u8; 32]
[src]
View this CompressedRistretto
as an array of bytes.
pub fn from_slice(bytes: &[u8]) -> CompressedRistretto
[src]
Construct a CompressedRistretto
from a slice of bytes.
Panics
If the input bytes
slice does not have a length of 32.
pub 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 Clone for CompressedRistretto
[src]
fn clone(&self) -> CompressedRistretto
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl ConstantTimeEq for CompressedRistretto
[src]
fn ct_eq(&self, other: &CompressedRistretto) -> Choice
[src]
impl Copy for CompressedRistretto
[src]
impl Debug for CompressedRistretto
[src]
impl Default for CompressedRistretto
[src]
fn default() -> CompressedRistretto
[src]
impl Eq for CompressedRistretto
[src]
impl Hash for CompressedRistretto
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Identity for CompressedRistretto
[src]
fn identity() -> CompressedRistretto
[src]
impl PartialEq<CompressedRistretto> for CompressedRistretto
[src]
fn eq(&self, other: &CompressedRistretto) -> bool
[src]
fn ne(&self, other: &CompressedRistretto) -> bool
[src]
impl StructuralEq for CompressedRistretto
[src]
impl StructuralPartialEq for CompressedRistretto
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompressedRistretto
[src]
impl Send for CompressedRistretto
[src]
impl Sync for CompressedRistretto
[src]
impl Unpin for CompressedRistretto
[src]
impl UnwindSafe for CompressedRistretto
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
[src]
impl<T> FromCast<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
[src]
U: FromBits<T>,
impl<T> IsIdentity for T where
T: ConstantTimeEq + Identity,
[src]
T: ConstantTimeEq + Identity,
pub fn is_identity(&Self) -> bool
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,