pub struct SigningKey(/* private fields */);Expand description
An ECDSA signing key: a nonzero scalar.
Signs pre-hashed messages: the caller hashes the message with the hash of matching size (SHA-256 for P-256, SHA-384 for P-384) and passes the digest. Served by the curve’s ECDSA driver. Zeroed on drop.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_bytes(bytes: &[u8; 48]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8; 48]) -> Result<Self, Error>
Load a signing key from its big-endian encoding. Fails if it is
zero or not less than n.
Sourcepub fn verifying_key(&self) -> Result<VerifyingKey, Error>
pub fn verifying_key(&self) -> Result<VerifyingKey, Error>
The corresponding verifying key.
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SigningKey
impl Debug for SigningKey
Source§impl Drop for SigningKey
impl Drop for SigningKey
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
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