Trait diem_sdk::crypto::Uniform [−][src]
pub trait Uniform { fn generate<R>(rng: &mut R) -> Self
where
R: RngCore + CryptoRng; fn generate_for_testing() -> Self { ... } }
Expand description
A type family for schemes which know how to generate key material from
a cryptographically-secure [CryptoRng
][::rand::CryptoRng].
Required methods
fn generate<R>(rng: &mut R) -> Self where
R: RngCore + CryptoRng,
[src]
R: RngCore + CryptoRng,
Expand description
Generate key material from an RNG. This should generally not be used for production purposes even with a good source of randomness. When possible use hardware crypto to generate and store private keys.
Provided methods
fn generate_for_testing() -> Self
[src]
Expand description
Generate a random key using the shared TEST_SEED
Implementations on Foreign Types
impl<S, P> Uniform for (S, P) where
S: Uniform,
P: for<'a> From<&'a S>,
[src]
impl<S, P> Uniform for (S, P) where
S: Uniform,
P: for<'a> From<&'a S>,
[src]A pair consisting of a private and public key
Implementors
impl Uniform for Ed25519PrivateKey
[src]
impl Uniform for Ed25519PrivateKey
[src]impl Uniform for MultiEd25519PrivateKey
[src]
impl Uniform for MultiEd25519PrivateKey
[src]impl Uniform for PrivateKey
[src]
impl Uniform for PrivateKey
[src]