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; 32]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8; 32]) -> 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§
Auto Trait Implementations§
impl Forget for SigningKey
impl Freeze for SigningKey
impl Move 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