pub struct SigningKey { /* private fields */ }Implementations§
Source§impl SigningKey
impl SigningKey
pub fn new<R: RngCore + CryptoRng>(rng: &mut R) -> Self
pub fn random() -> Self
pub fn to_scalar(&self) -> NonZeroScalar
pub fn to_bytes(&self) -> [u8; 32]
pub fn from_bytes(bytes: [u8; 32]) -> Result<Self>
pub fn public(&self) -> VerifyingKey
pub fn sign_prehashed_with_rng<R: RngCore + CryptoRng>( &self, rng: &mut R, hash: [u8; 32], ) -> Signature
pub fn sign_prehashed(&self, hash: [u8; 32]) -> Signature
pub fn sign(&self, msg: &[u8]) -> Signature
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy 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 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