Trait PrivateKeyExt

Source
pub trait PrivateKeyExt: PrivateKey {
    // Required method
    fn from_rng<R: Rng + CryptoRng>(rng: &mut R) -> Self;

    // Provided method
    fn from_seed(seed: u64) -> Self { ... }
}
Expand description

A PrivateKey that can be generated from a seed or RNG.

Required Methods§

Source

fn from_rng<R: Rng + CryptoRng>(rng: &mut R) -> Self

Create a fresh PrivateKey using the supplied RNG.

Provided Methods§

Source

fn from_seed(seed: u64) -> Self

Create a PrivateKey from a seed.

§Warning

This function is insecure and should only be used for examples and testing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl PrivateKeyExt for commonware_cryptography::bls12381::PrivateKey

Source§

impl PrivateKeyExt for commonware_cryptography::ed25519::PrivateKey

Source§

impl PrivateKeyExt for commonware_cryptography::secp256r1::PrivateKey