pub struct SigningKey { /* private fields */ }Expand description
An Ed25519 signing key.
This is also called a secret key by other implementations.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_bytes(secret_key: &[u8; 32]) -> Self
pub fn from_bytes(secret_key: &[u8; 32]) -> Self
Construct a SigningKey from a [SecretKey]
Sourcepub fn to_bytes(&self) -> [u8; 32]
pub fn to_bytes(&self) -> [u8; 32]
Convert this SigningKey into a [SecretKey]
Sourcepub fn as_bytes(&self) -> &[u8; 32]
pub fn as_bytes(&self) -> &[u8; 32]
Convert this SigningKey into a [SecretKey] reference
Sourcepub fn new<R: RngCore + CryptoRng>(rng: R) -> SigningKey
pub fn new<R: RngCore + CryptoRng>(rng: R) -> SigningKey
Generate a new signing key.
Sourcepub fn verification_key(&self) -> VerificationKey
pub fn verification_key(&self) -> VerificationKey
Get the VerificationKey for this SigningKey.
Trait Implementations§
Source§impl AsRef<[u8]> for SigningKey
impl AsRef<[u8]> for SigningKey
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 moreSource§impl ConstantTimeEq for SigningKey
impl ConstantTimeEq for SigningKey
Source§impl Debug for SigningKey
impl Debug for SigningKey
Source§impl<'a> From<&'a SigningKey> for VerificationKey
impl<'a> From<&'a SigningKey> for VerificationKey
Source§fn from(sk: &'a SigningKey) -> VerificationKey
fn from(sk: &'a SigningKey) -> VerificationKey
Converts to this type from the input type.
Source§impl<'a> From<&'a SigningKey> for VerificationKeyBytes
impl<'a> From<&'a SigningKey> for VerificationKeyBytes
Source§fn from(sk: &'a SigningKey) -> VerificationKeyBytes
fn from(sk: &'a SigningKey) -> VerificationKeyBytes
Converts to this type from the input type.
Source§impl PartialEq for SigningKey
impl PartialEq for SigningKey
Source§impl Signer<Signature> for SigningKey
impl Signer<Signature> for SigningKey
Source§impl TryFrom<&[u8]> for SigningKey
impl TryFrom<&[u8]> for SigningKey
Source§impl Zeroize for SigningKey
impl Zeroize for SigningKey
impl Copy for SigningKey
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.