exonum_crypto

Function gen_keypair_from_seed

Source
pub fn gen_keypair_from_seed(seed: &Seed) -> (PublicKey, SecretKey)
Expand description

Computes a secret key and a corresponding public key from a Seed.

ยงExamples

The example below generates a keypair that depends on the indicated seed. Indicating the same seed value always results in the same keypair.

use exonum_crypto::{SEED_LENGTH, Seed};

let (public_key, secret_key) = exonum_crypto::gen_keypair_from_seed(&Seed::new([1; SEED_LENGTH]));