pub struct KeyPair { /* private fields */ }Expand description
A Curve25519 key pair: the controller’s long-term pair, or a node’s.
Implementations§
Source§impl KeyPair
impl KeyPair
Sourcepub fn from_private(private: [u8; 32]) -> Self
pub fn from_private(private: [u8; 32]) -> Self
The key pair for a stored private key (clamped as X25519 does).
Sourcepub fn private_bytes(&self) -> [u8; 32]
pub fn private_bytes(&self) -> [u8; 32]
The private key, for storage.
The ECDH shared secret with a peer’s public key. Refuses low-order points, whose all-zero secret anyone could predict.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyPair
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnsafeUnpin for KeyPair
impl UnwindSafe for KeyPair
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