Struct bdk_chain::bitcoin::secp256k1::ellswift::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
§fn eq(&self, other: &ElligatorSwiftSharedSecret) -> bool
fn eq(&self, other: &ElligatorSwiftSharedSecret) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§fn partial_cmp(&self, other: &ElligatorSwiftSharedSecret) -> Option<Ordering>
fn partial_cmp(&self, other: &ElligatorSwiftSharedSecret) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreAuto 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
§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