pub struct Privkey { /* private fields */ }
Expand description
Wrapped private 256-bit key used as x in an ECDSA signature
Implementations§
Source§impl Privkey
impl Privkey
Sourcepub fn sign_recoverable(&self, message: &Message) -> Result<Signature, Error>
pub fn sign_recoverable(&self, message: &Message) -> Result<Signature, Error>
Constructs a signature for message using the Privkey and RFC6979 nonce Requires a signing-capable context.
Sourcepub fn from_slice(key: &[u8]) -> Self
pub fn from_slice(key: &[u8]) -> Self
Creates a new Privkey from a slice
§Panics
This function will panic if the key slice length is not equal 32 .
Trait Implementations§
impl Eq for Privkey
impl StructuralPartialEq for Privkey
Auto Trait Implementations§
impl Freeze for Privkey
impl RefUnwindSafe for Privkey
impl Send for Privkey
impl Sync for Privkey
impl Unpin for Privkey
impl UnwindSafe for Privkey
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,
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
)