Trait KeyProvider

Source
pub trait KeyProvider<T> {
    // Required methods
    fn x25519_public_key(account_id: &T) -> Option<X25519PublicKey>;
    fn provisioning_key(account_id: &T) -> Option<EncodedVerifyingKey>;
}
Expand description

A trait used to get different stored keys for a given account ID.

Not every account ID will have an given key, in which case the implementer is expected to return None.

Required Methods§

Source

fn x25519_public_key(account_id: &T) -> Option<X25519PublicKey>

Get an X25519 public key, if any, for the given account ID.

Source

fn provisioning_key(account_id: &T) -> Option<EncodedVerifyingKey>

Get a provisioning certification key, if any, for the given account ID.

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§