[][src]Trait solana_libra_nextgen_crypto::traits::PublicKey

pub trait PublicKey: Sized + Clone + Eq + Hash + for<'a> From<&'a Self::PrivateKeyMaterial> {
    type PrivateKeyMaterial: PrivateKey<PublicKeyMaterial = Self>;
    fn length() -> usize;
}

A type for key material that can be publicly shared, and in asymmetric fashion, can be obtained from a PrivateKey reference. This convertibility requirement ensures the existence of a deterministic, canonical public key construction from a private key.

Associated Types

type PrivateKeyMaterial: PrivateKey<PublicKeyMaterial = Self>

We require public / private types to be coupled, i.e. their associated type is each other.

Loading content...

Required methods

fn length() -> usize

The length of the PublicKey

Loading content...

Implementors

Loading content...