pub struct SecretKey<T>(_)
where
T: Zeroize;
Expand description
DH secret key.
Implementations§
source§impl SecretKey<X25519>
impl SecretKey<X25519>
sourcepub fn from_ed25519(ed25519_sk: &SecretKey) -> SecretKey<X25519>
pub fn from_ed25519(ed25519_sk: &SecretKey) -> SecretKey<X25519>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> ProtocolName for Twhere
T: AsRef<[u8]>,
impl<T> ProtocolName for Twhere T: AsRef<[u8]>,
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)