Struct diem_keygen::KeyGen
source · pub struct KeyGen(_);
Expand description
Ed25519 key generator.
Implementations§
source§impl KeyGen
impl KeyGen
sourcepub fn from_os_rng() -> Self
pub fn from_os_rng() -> Self
Constructs a key generator with a random seed. The random seed itself is generated using the OS rng.
sourcepub fn generate_keypair(&mut self) -> (Ed25519PrivateKey, Ed25519PublicKey)
pub fn generate_keypair(&mut self) -> (Ed25519PrivateKey, Ed25519PublicKey)
Generate an Ed25519 key pair.