Struct ring::agreement::EphemeralPrivateKey [−][src]
pub struct EphemeralPrivateKey { /* fields omitted */ }An ephemeral private key for use (only) with agree_ephemeral. The
signature of agree_ephemeral ensures that an EphemeralPrivateKey can be
used for at most one key agreement.
Implementations
impl EphemeralPrivateKey[src]
impl EphemeralPrivateKey[src]pub fn generate(
alg: &'static Algorithm,
rng: &dyn SecureRandom
) -> Result<Self, Unspecified>[src]
alg: &'static Algorithm,
rng: &dyn SecureRandom
) -> Result<Self, Unspecified>
Generate a new ephemeral private key for the given algorithm.
pub fn compute_public_key(&self) -> Result<PublicKey, Unspecified>[src]
Computes the public key from the private key.
pub fn algorithm(&self) -> &'static Algorithm[src]
The algorithm for the private key.