[−][src]Struct rc_crypto::agreement::KeyPair
A key pair for key agreement.
Fields
private_key: PrivateKey<U>
public_key: PublicKey
Implementations
impl<U: Lifetime> KeyPair<U>
[src]
pub fn generate(alg: &'static Algorithm) -> Result<Self>
[src]
Generate a new key pair for the given algorithm.
pub fn from_private_key(private_key: PrivateKey<U>) -> Result<Self>
[src]
pub fn private_key(&self) -> &PrivateKey<U>
[src]
The private key.
pub fn public_key(&self) -> &PublicKey
[src]
The public key.
pub fn split(self) -> (PrivateKey<U>, PublicKey)
[src]
Split the key pair apart.
impl KeyPair<Static>
[src]
pub fn from(private_key: PrivateKey<Static>) -> Result<Self>
[src]
Auto Trait Implementations
impl<U> RefUnwindSafe for KeyPair<U> where
U: RefUnwindSafe,
U: RefUnwindSafe,
impl<U> Send for KeyPair<U> where
U: Send,
U: Send,
impl<U> !Sync for KeyPair<U>
impl<U> Unpin for KeyPair<U> where
U: Unpin,
U: Unpin,
impl<U> UnwindSafe for KeyPair<U> where
U: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,