[][src]Function exonum_crypto::gen_keypair_from_seed

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

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]));