Struct libp2p_noise::SecretKey
source · pub struct SecretKey<T: Zeroize>(_);
Expand description
DH secret key.
Implementations§
source§impl SecretKey<X25519>
impl SecretKey<X25519>
sourcepub fn from_ed25519(ed25519_sk: &SecretKey) -> Self
pub fn from_ed25519(ed25519_sk: &SecretKey) -> Self
Construct a X25519 secret key from a Ed25519 secret key.
Note: If the Ed25519 secret key is already used in the context of other cryptographic protocols outside of Noise, it should be preferred to create a new keypair for use in the Noise protocol.
See also:
Trait Implementations§
source§impl From<SecretKey<X25519Spec>> for Keypair<X25519Spec>
impl From<SecretKey<X25519Spec>> for Keypair<X25519Spec>
Promote a X25519 secret key into a keypair.
source§fn from(secret: SecretKey<X25519Spec>) -> Keypair<X25519Spec>
fn from(secret: SecretKey<X25519Spec>) -> Keypair<X25519Spec>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> RefUnwindSafe for SecretKey<T>where T: RefUnwindSafe,
impl<T> Send for SecretKey<T>where T: Send,
impl<T> Sync for SecretKey<T>where T: Sync,
impl<T> Unpin for SecretKey<T>where T: Unpin,
impl<T> UnwindSafe for SecretKey<T>where T: UnwindSafe,
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