We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Self
ring::agreement
1 parent 7e524b5 commit 9859d62Copy full SHA for 9859d62
src/agreement.rs
@@ -103,13 +103,13 @@ impl<'a> EphemeralPrivateKey {
103
/// Generate a new ephemeral private key for the given algorithm.
104
pub fn generate(
105
alg: &'static Algorithm, rng: &rand::SecureRandom,
106
- ) -> Result<EphemeralPrivateKey, error::Unspecified> {
+ ) -> Result<Self, error::Unspecified> {
107
// NSA Guide Step 1.
108
//
109
// This only handles the key generation part of step 1. The rest of
110
// step one is done by `compute_public_key()`.
111
let private_key = ec::Seed::generate(&alg.curve, rng)?;
112
- Ok(EphemeralPrivateKey { private_key, alg })
+ Ok(Self { private_key, alg })
113
}
114
115
/// Computes the public key from the private key.
0 commit comments