pub struct PrivateKey(/* private fields */);
Available on crate feature
ed25519
only.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 AsRef<SecretKey> for PrivateKey
impl AsRef<SecretKey> for PrivateKey
Source§impl Borrow<SecretKey> for PrivateKey
impl Borrow<SecretKey> for PrivateKey
Source§impl Clone for PrivateKey
impl Clone for PrivateKey
Source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
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 Debug for PrivateKey
impl Debug for PrivateKey
Source§impl Deref for PrivateKey
impl Deref for PrivateKey
Source§impl EcSign for PrivateKey
impl EcSign for PrivateKey
Source§impl EcSk for PrivateKey
impl EcSk for PrivateKey
Source§impl From<PrivateKey> for SecretKey
impl From<PrivateKey> for SecretKey
Source§fn from(wrapped: PrivateKey) -> Self
fn from(wrapped: PrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<SecretKey> for PrivateKey
impl From<SecretKey> for PrivateKey
Source§impl Hash for PrivateKey
impl Hash for PrivateKey
Source§impl Ord for PrivateKey
impl Ord for PrivateKey
Source§impl PartialEq for PrivateKey
impl PartialEq for PrivateKey
Source§impl PartialOrd for PrivateKey
impl PartialOrd for PrivateKey
Source§impl Wrapper for PrivateKey
impl Wrapper for PrivateKey
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Eq for PrivateKey
impl StructuralPartialEq for PrivateKey
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
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