Struct secp256k1::ecdh::SharedSecret
source · [−]#[repr(C)]pub struct SharedSecret(_);
Expand description
A tag used for recovering the public key from a compact signature
Implementations
sourceimpl SharedSecret
impl SharedSecret
sourcepub fn new(
secp: &Secp256k1,
point: &PublicKey,
scalar: &SecretKey
) -> SharedSecret
pub fn new(
secp: &Secp256k1,
point: &PublicKey,
scalar: &SecretKey
) -> SharedSecret
Creates a new shared secret from a pubkey and secret key
sourcepub fn new_raw(
secp: &Secp256k1,
point: &PublicKey,
scalar: &SecretKey
) -> SharedSecret
pub fn new_raw(
secp: &Secp256k1,
point: &PublicKey,
scalar: &SecretKey
) -> SharedSecret
Creates a new unhashed shared secret from a pubkey and secret key
sourcepub fn as_ptr(&self) -> *const SharedSecret
pub fn as_ptr(&self) -> *const SharedSecret
Obtains a raw pointer suitable for use with FFI functions
Trait Implementations
sourceimpl Clone for SharedSecret
impl Clone for SharedSecret
sourcefn clone(&self) -> SharedSecret
fn clone(&self) -> SharedSecret
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SharedSecret
impl Debug for SharedSecret
Creates a new shared secret from a FFI shared secret
sourcefn from(ss: SharedSecret) -> SharedSecret
fn from(ss: SharedSecret) -> SharedSecret
Performs the conversion.
sourceimpl Index<Range<usize>> for SharedSecret
impl Index<Range<usize>> for SharedSecret
sourceimpl Index<RangeFrom<usize>> for SharedSecret
impl Index<RangeFrom<usize>> for SharedSecret
sourceimpl Index<RangeFull> for SharedSecret
impl Index<RangeFull> for SharedSecret
sourceimpl Index<usize> for SharedSecret
impl Index<usize> for SharedSecret
sourcefn eq(&self, other: &SharedSecret) -> bool
fn eq(&self, other: &SharedSecret) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SharedSecret) -> bool
fn ne(&self, other: &SharedSecret) -> bool
This method tests for !=
.
impl Copy for SharedSecret
impl Eq for SharedSecret
impl StructuralEq for SharedSecret
impl StructuralPartialEq for SharedSecret
Auto Trait Implementations
impl RefUnwindSafe for SharedSecret
impl Send for SharedSecret
impl Sync for SharedSecret
impl Unpin for SharedSecret
impl UnwindSafe for SharedSecret
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more