Struct cryptimitives::key::KeyPair
source · [−]pub struct KeyPair<SK> where
SK: SecretKey, { /* private fields */ }
Trait Implementations
sourceimpl<SK> DiffieHellman for KeyPair<SK> where
SK: SecretKey + Sign + DiffieHellman,
impl<SK> DiffieHellman for KeyPair<SK> where
SK: SecretKey + Sign + DiffieHellman,
type SSK = <SK as DiffieHellman>::SSK
type PK = <SK as DiffieHellman>::PK
sourcefn diffie_hellman(&self, peer_public: &Self::PK) -> <SK as DiffieHellman>::SSK
fn diffie_hellman(&self, peer_public: &Self::PK) -> <SK as DiffieHellman>::SSK
Derives SharedSecretKey
from the other PublicKey
sourceimpl<SK> FromBytes for KeyPair<SK> where
SK: SecretKey + FromBytes + Len,
SK::PK: FromBytes + Len,
KeyPairError: From<<SK as FromBytes>::E> + From<<<SK as SecretKey>::PK as FromBytes>::E>,
impl<SK> FromBytes for KeyPair<SK> where
SK: SecretKey + FromBytes + Len,
SK::PK: FromBytes + Len,
KeyPairError: From<<SK as FromBytes>::E> + From<<<SK as SecretKey>::PK as FromBytes>::E>,
type E = KeyPairError
sourceimpl<SK> KeyPair for KeyPair<SK> where
SK: SecretKey,
impl<SK> KeyPair for KeyPair<SK> where
SK: SecretKey,
Auto Trait Implementations
impl<SK> RefUnwindSafe for KeyPair<SK> where
SK: RefUnwindSafe,
<SK as SecretKey>::PK: RefUnwindSafe,
impl<SK> Send for KeyPair<SK> where
SK: Send,
<SK as SecretKey>::PK: Send,
impl<SK> Sync for KeyPair<SK> where
SK: Sync,
<SK as SecretKey>::PK: Sync,
impl<SK> Unpin for KeyPair<SK> where
SK: Unpin,
<SK as SecretKey>::PK: Unpin,
impl<SK> UnwindSafe for KeyPair<SK> where
SK: UnwindSafe,
<SK as SecretKey>::PK: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more