Struct ckb_crypto::secp::Privkey
source · 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§
source§impl PartialEq<Privkey> for Privkey
impl PartialEq<Privkey> for Privkey
impl Eq for Privkey
impl StructuralEq for Privkey
impl StructuralPartialEq for Privkey
Auto Trait Implementations§
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