pub fn key_gen( alg: Algorithm, rng: &mut (impl CryptoRng + Rng), ) -> Result<(Vec<u8>, Vec<u8>), Error>
Generate a fresh key pair.
The function returns the (secret key, public key) tuple, or an Error.
Error