[][src]Trait double_ratchet::KeyPair

pub trait KeyPair {
    type PublicKey;
    fn new<R: CryptoRng + RngCore>(rng: &mut R) -> Self;
fn public(&self) -> &Self::PublicKey; }

A private-/public-key pair

This trait is required for CryptoProvider::KeyPair

Associated Types

type PublicKey

Type of the public half of the key pair

This type should be equal to CryptoProvider::PublicKey

Loading content...

Required methods

fn new<R: CryptoRng + RngCore>(rng: &mut R) -> Self

Generate a new random KeyPair

fn public(&self) -> &Self::PublicKey

Get a reference to the public half of the key pair

Loading content...

Implementors

Loading content...