Trait diem_crypto::traits::Uniform
source · pub trait Uniform {
// Required method
fn generate<R>(rng: &mut R) -> Self
where R: RngCore + CryptoRng;
// Provided method
fn generate_for_testing() -> Self
where Self: Sized { ... }
}
Expand description
A type family for schemes which know how to generate key material from
a cryptographically-secure CryptoRng
.
Required Methods§
Provided Methods§
sourcefn generate_for_testing() -> Selfwhere
Self: Sized,
fn generate_for_testing() -> Selfwhere Self: Sized,
Generate a random key using the shared TEST_SEED
Implementations on Foreign Types§
source§impl<S, P> Uniform for (S, P)where
S: Uniform,
for<'a> P: From<&'a S>,
impl<S, P> Uniform for (S, P)where S: Uniform, for<'a> P: From<&'a S>,
A pair consisting of a private and public key