pub struct SecretKey { /* private fields */ }Available on crate feature
eddsa only.Expand description
An Ed25519 private key usable for signing.
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn from_bytes(bin: &[u8; 32]) -> Self
pub fn from_bytes(bin: &[u8; 32]) -> Self
Converts a 32-byte array into a private key.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Retrieves the public counterpart of the secret key.
Sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
Returns a 256-bit unique identifier for this key. For Ed25519, that is the SHA256 hash of the raw public key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnsafeUnpin for SecretKey
impl UnwindSafe for SecretKey
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