pub struct SecretKey(/* private fields */);
Expand description
The private/signing key.
Implementations§
Methods from Deref<Target = SecretKey>§
pub const BYTES: usize = 64usize
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Returns the public counterpart of a secret key.
Sourcepub fn validate_public_key(&self, pk: &PublicKey) -> Result<(), Error>
pub fn validate_public_key(&self, pk: &PublicKey) -> Result<(), Error>
Returns Ok(())
if the given public key is the public counterpart of
this secret key.
Returns Err(Error::InvalidPublicKey)
otherwise.
The public key is recomputed (not just copied) from the secret key,
so this will detect corruption of the secret key.
Sourcepub fn sign_incremental(&self, noise: Noise) -> SigningState
pub fn sign_incremental(&self, noise: Noise) -> SigningState
Sign a multi-part message (streaming API).
It is critical for noise
to never repeat.
Trait Implementations§
Source§impl Ord for SecretKey
impl Ord for SecretKey
Source§impl PartialOrd for SecretKey
impl PartialOrd for SecretKey
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin 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