OpenMlsProvider

Trait OpenMlsProvider 

pub trait OpenMlsProvider {
    type CryptoProvider: OpenMlsCrypto;
    type RandProvider: OpenMlsRand;
    type StorageProvider: StorageProvider<openmls_traits::::OpenMlsProvider::StorageProvider::{constant#0}>;

    // Required methods
    fn storage(&self) -> &Self::StorageProvider;
    fn crypto(&self) -> &Self::CryptoProvider;
    fn rand(&self) -> &Self::RandProvider;
}
Available on (32-bit or 64-bit) and (crate features test-utils) only.
Expand description

The OpenMLS Crypto Provider Trait

An implementation of this trait must be passed in to the public OpenMLS API to perform randomness generation, cryptographic operations, and key storage.

Required Associated Types§

type CryptoProvider: OpenMlsCrypto

type RandProvider: OpenMlsRand

type StorageProvider: StorageProvider<openmls_traits::::OpenMlsProvider::StorageProvider::{constant#0}>

Required Methods§

fn storage(&self) -> &Self::StorageProvider

fn crypto(&self) -> &Self::CryptoProvider

Get the crypto provider.

fn rand(&self) -> &Self::RandProvider

Get the randomness provider.

Implementations on Foreign Types§

§

impl OpenMlsProvider for OpenMlsRustCrypto

§

type CryptoProvider = RustCrypto

§

type RandProvider = RustCrypto

§

type StorageProvider = MemoryStorage

§

fn storage(&self) -> &<OpenMlsRustCrypto as OpenMlsProvider>::StorageProvider

§

fn crypto(&self) -> &<OpenMlsRustCrypto as OpenMlsProvider>::CryptoProvider

§

fn rand(&self) -> &<OpenMlsRustCrypto as OpenMlsProvider>::RandProvider

§

impl OpenMlsProvider for Provider

§

type CryptoProvider = CryptoProvider

§

type RandProvider = CryptoProvider

§

type StorageProvider = MemoryStorage

§

fn storage(&self) -> &<Provider as OpenMlsProvider>::StorageProvider

§

fn crypto(&self) -> &<Provider as OpenMlsProvider>::CryptoProvider

§

fn rand(&self) -> &<Provider as OpenMlsProvider>::RandProvider

Implementors§