Struct ElligatorSwiftSharedSecret
pub struct ElligatorSwiftSharedSecret(/* private fields */);
Expand description
The result of ElligatorSwift::shared_secret
, which is a shared secret
computed from the x-only ECDH using both parties’ public keys (ElligatorSwift
encoded) and our own
private key.
Implementations§
pub const fn from_secret_bytes(bytes: [u8; 32]) -> ElligatorSwiftSharedSecret
pub const fn from_secret_bytes(bytes: [u8; 32]) -> ElligatorSwiftSharedSecret
Creates shared secret from bytes.
This is generally not needed except for unusual cases like restoring the secret from a database.
pub const fn to_secret_bytes(self) -> [u8; 32]
pub const fn to_secret_bytes(self) -> [u8; 32]
Returns the secret bytes as an array.
pub const fn as_secret_bytes(&self) -> &[u8; 32]
pub const fn as_secret_bytes(&self) -> &[u8; 32]
Returns the secret bytes as a reference to an array.
Trait Implementations§
§fn clone(&self) -> ElligatorSwiftSharedSecret
fn clone(&self) -> ElligatorSwiftSharedSecret
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 more§fn cmp(&self, other: &ElligatorSwiftSharedSecret) -> Ordering
fn cmp(&self, other: &ElligatorSwiftSharedSecret) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more