pub struct SigningKey { /* private fields */ }Expand description
Ed25519 signing key (private key)
This wraps ed25519-dalek’s SigningKey for proper Ed25519 signatures per RFC 8032.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn generate() -> Self
pub fn generate() -> Self
Generate a new random signing key using a cryptographically secure RNG
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create from raw bytes (32 bytes for Ed25519 secret key)
§Errors
Returns error if bytes length is not 32
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Derive the verifying (public) 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 moreAuto 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