[−][src]Struct curve25519_dalek::edwards::CompressedEdwardsY
In "Edwards y" / "Ed25519" format, the curve point \((x,y)\) is determined by the \(y\)-coordinate and the sign of \(x\).
The first 255 bits of a CompressedEdwardsY
represent the
\(y\)-coordinate. The high bit of the 32nd byte gives the sign of \(x\).
Methods
impl CompressedEdwardsY
[src]
pub fn as_bytes(&self) -> &[u8; 32]
[src]
View this CompressedEdwardsY
as an array of bytes.
pub fn to_bytes(&self) -> [u8; 32]
[src]
Copy this CompressedEdwardsY
to an array of bytes.
pub fn decompress(&self) -> Option<EdwardsPoint>
[src]
Attempt to decompress to an EdwardsPoint
.
Returns None
if the input is not the \(y\)-coordinate of a
curve point.
impl CompressedEdwardsY
[src]
pub fn from_slice(bytes: &[u8]) -> CompressedEdwardsY
[src]
Construct a CompressedEdwardsY
from a slice of bytes.
Panics
If the input bytes
slice does not have a length of 32. For
a panic-safe version of this API, see the implementation of
TryFrom<&[u8]>
.
Trait Implementations
impl Identity for CompressedEdwardsY
[src]
fn identity() -> CompressedEdwardsY
[src]
impl From<[u8; 32]> for CompressedEdwardsY
[src]
impl Debug for CompressedEdwardsY
[src]
impl PartialEq<CompressedEdwardsY> for CompressedEdwardsY
[src]
fn eq(&self, other: &CompressedEdwardsY) -> bool
[src]
fn ne(&self, other: &CompressedEdwardsY) -> bool
[src]
impl Eq for CompressedEdwardsY
[src]
impl<'_> TryFrom<&'_ [u8]> for CompressedEdwardsY
[src]
type Error = CurveError
The type returned in the event of a conversion error.
fn try_from(bytes: &[u8]) -> Result<CompressedEdwardsY, CurveError>
[src]
impl Copy for CompressedEdwardsY
[src]
impl Clone for CompressedEdwardsY
[src]
fn clone(&self) -> CompressedEdwardsY
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for CompressedEdwardsY
[src]
fn default() -> CompressedEdwardsY
[src]
impl ConstantTimeEq for CompressedEdwardsY
[src]
fn ct_eq(&self, other: &CompressedEdwardsY) -> Choice
[src]
impl Serialize for CompressedEdwardsY
[src]
impl<'de> Deserialize<'de> for CompressedEdwardsY
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Unpin for CompressedEdwardsY
impl Send for CompressedEdwardsY
impl Sync for CompressedEdwardsY
impl UnwindSafe for CompressedEdwardsY
impl RefUnwindSafe for CompressedEdwardsY
Blanket Implementations
impl<T> IsIdentity for T where
T: ConstantTimeEq + Identity,
[src]
T: ConstantTimeEq + Identity,
fn is_identity(&Self) -> bool
[src]
impl<T> From<T> for 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.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
[src]
T: InitializableFromZeroed + ?Sized,
impl<T> InitializableFromZeroed for T where
T: Default,
[src]
T: Default,
unsafe fn initialize(place: *mut T)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,