Skip to main content

RandomKeyPair

Trait RandomKeyPair 

Source
pub trait RandomKeyPair: Sized {
    // Required method
    fn generate_with_address(rng: &mut StdRng) -> (Address, Self);
}
Expand description

Random key-pair generation for the get_key_pair helpers, implemented for the fastcrypto authority/network keypairs and the SDK account keys.

Required Methods§

Source

fn generate_with_address(rng: &mut StdRng) -> (Address, Self)

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.

Implementations on Foreign Types§

Source§

impl RandomKeyPair for BLS12381KeyPair

Source§

fn generate_with_address(rng: &mut StdRng) -> (Address, Self)

Source§

impl RandomKeyPair for Ed25519KeyPair

Source§

fn generate_with_address(rng: &mut StdRng) -> (Address, Self)

Source§

impl RandomKeyPair for Ed25519PrivateKey

Source§

fn generate_with_address(rng: &mut StdRng) -> (Address, Self)

Source§

impl RandomKeyPair for Secp256k1PrivateKey

Source§

fn generate_with_address(rng: &mut StdRng) -> (Address, Self)

Source§

impl RandomKeyPair for Secp256r1PrivateKey

Source§

fn generate_with_address(rng: &mut StdRng) -> (Address, Self)

Implementors§