Struct libsecp256k1::SecretKey
source · pub struct SecretKey(/* private fields */);
Expand description
Secret key (256-bit) on a secp256k1 curve.
Implementations§
source§impl SecretKey
impl SecretKey
pub fn parse(p: &[u8; 32]) -> Result<SecretKey, Error>
pub fn parse_slice(p: &[u8]) -> Result<SecretKey, Error>
pub fn random<R: Rng>(rng: &mut R) -> SecretKey
pub fn serialize(&self) -> [u8; 32]
pub fn tweak_add_assign(&mut self, tweak: &SecretKey) -> Result<(), Error>
pub fn tweak_mul_assign(&mut self, tweak: &SecretKey) -> Result<(), Error>
pub fn inv(&self) -> Self
Trait Implementations§
source§impl PartialEq for SecretKey
impl PartialEq for SecretKey
impl Copy for SecretKey
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)