[−][src]Struct rc_crypto::agreement::PrivateKey
A private key for key agreement.
Fields
wrapped: PrivateKey
alg: &'static Algorithm
usage: PhantomData<U>
Implementations
impl<U: Lifetime> PrivateKey<U>
[src]
pub fn algorithm(&self) -> &'static Algorithm
[src]
pub fn compute_public_key(&self) -> Result<PublicKey>
[src]
pub fn agree(
self,
peer_public_key: &UnparsedPublicKey<'_>
) -> Result<InputKeyMaterial>
[src]
self,
peer_public_key: &UnparsedPublicKey<'_>
) -> Result<InputKeyMaterial>
Ephemeral agreement.
This consumes self
, ensuring that the private key can
only be used for a single agreement operation.
impl PrivateKey<Static>
[src]
pub fn agree_static(
&self,
peer_public_key: &UnparsedPublicKey<'_>
) -> Result<InputKeyMaterial>
[src]
&self,
peer_public_key: &UnparsedPublicKey<'_>
) -> Result<InputKeyMaterial>
Static agreement.
This borrows self
, allowing the private key to
be used for a multiple agreement operations.
pub fn import(ec_key: &EcKey) -> Result<Self>
[src]
pub fn export(&self) -> Result<EcKey>
[src]
pub fn _tests_only_dangerously_convert_to_ephemeral(
self
) -> PrivateKey<Ephemeral>
[src]
self
) -> PrivateKey<Ephemeral>
The whole point of having Ephemeral
and Static
lifetimes is to use the type
system to avoid re-using the same ephemeral key. However for tests we might need
to create a "static" ephemeral key.
Auto Trait Implementations
impl<U> RefUnwindSafe for PrivateKey<U> where
U: RefUnwindSafe,
U: RefUnwindSafe,
impl<U> Send for PrivateKey<U> where
U: Send,
U: Send,
impl<U> !Sync for PrivateKey<U>
impl<U> Unpin for PrivateKey<U> where
U: Unpin,
U: Unpin,
impl<U> UnwindSafe for PrivateKey<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>,