pub trait KeyGenerator: KeyMaterial {
    // Required methods
    fn from_seed(seed: &[u8]) -> Self
       where Self: Sized;
    fn from_public_key(public_key: &[u8]) -> Self
       where Self: Sized;
    fn from_secret_key(private_key: &[u8]) -> Self
       where Self: Sized;

    // Provided method
    fn new() -> Self
       where Self: Sized { ... }
}
Expand description

Collection of methods to initialize a key pair using random or deterministic manner

Required Methods§

source

fn from_seed(seed: &[u8]) -> Selfwhere Self: Sized,

Generates keys deterministically using a given seed

source

fn from_public_key(public_key: &[u8]) -> Selfwhere Self: Sized,

Generates keys from existing public key

source

fn from_secret_key(private_key: &[u8]) -> Selfwhere Self: Sized,

Generate keys from existing secret key

Provided Methods§

source

fn new() -> Selfwhere Self: Sized,

Generates random keys

Implementors§