pub fn generate_keypair(
    rng: &dyn SecureRandom,
) -> Result<(EphemeralPrivateKey, PublicKey), error::Unspecified> {
    let private_key = EphemeralPrivateKey::generate(&X25519, rng)?;
    let public_key = private_key.compute_public_key()?;
    Ok((private_key, public_key))
}
/// Generate a valid X25519 asymmetric encryption/decryption key pair.
Generate a valid X25519 asymmetric encryption/decryption key pair.
Generate a valid X25519 asymmetric encryption / decryption key pair .
pub fn generate_keypair(
    rng: &dyn SecureRandom,
) -> Result<(EphemeralPrivateKey, PublicKey), error::Unspecified> {
    let private_key = EphemeralPrivateKey::generate(&X25519, rng)?;
    let public_key = private_key.compute_public_key()?;
    Ok((private_key, public_key))
}
pub fn generate_keypair ( rng : & dyn SecureRandom , ) -> Result < ( EphemeralPrivateKey , PublicKey ) , error :: Unspecified > { let private_key = EphemeralPrivateKey :: generate ( & X25519 , rng ) ? ; let public_key = private_key . compute_public_key ( ) ? ; Ok ( ( private_key , public_key ) ) }
Generate a valid X25519 asymmetric encryption/decryption key pair.
Generate a valid X25519 asymmetric encryption / decryption key pair .
rng
&dyn SecureRandom
rng
&dyn SecureRandom