pub fn generate_secret(
alg: Algorithm,
rng: &mut (impl CryptoRng + Rng),
) -> Result<Vec<u8>, Error>
Expand description
Generate a new private key scalar.
The function returns the new scalar or an Error::KeyGenError
if it was unable to
generate a new key. If this happens, the provided rng
is probably faulty.