pub trait KeyManager {
    // Required methods
    fn clear_cache(&self);
    fn get_or_create_keys(
        &self,
        key_pair_id: KeyPairId
    ) -> Result<KeyPair, KeyManagerError>;
    fn get_public_key(
        &self,
        key_pair_id: KeyPairId
    ) -> Result<SignedPublicKey, KeyManagerError>;
    fn get_or_create_ephemeral_keys(
        &self,
        key_pair_id: KeyPairId,
        epoch: EpochTime
    ) -> Result<KeyPair, KeyManagerError>;
    fn get_public_ephemeral_key(
        &self,
        key_pair_id: KeyPairId,
        epoch: EpochTime
    ) -> Result<SignedPublicKey, KeyManagerError>;
    fn box_clone(&self) -> Box<dyn KeyManager>;
}
Expand description

Key manager interface.

Required Methods§

source

fn clear_cache(&self)

Clear local key cache.

See the oasis-core documentation for details.

source

fn get_or_create_keys( &self, key_pair_id: KeyPairId ) -> Result<KeyPair, KeyManagerError>

Get or create named key pair.

See the oasis-core documentation for details. This variant of the method synchronously blocks for the result.

source

fn get_public_key( &self, key_pair_id: KeyPairId ) -> Result<SignedPublicKey, KeyManagerError>

Get public key for a key pair id.

See the oasis-core documentation for details. This variant of the method synchronously blocks for the result.

source

fn get_or_create_ephemeral_keys( &self, key_pair_id: KeyPairId, epoch: EpochTime ) -> Result<KeyPair, KeyManagerError>

Get or create named ephemeral key pair for given epoch.

See the oasis-core documentation for details. This variant of the method synchronously blocks for the result.

source

fn get_public_ephemeral_key( &self, key_pair_id: KeyPairId, epoch: EpochTime ) -> Result<SignedPublicKey, KeyManagerError>

Get ephemeral public key for an epoch and a key pair id.

See the oasis-core documentation for details. This variant of the method synchronously blocks for the result.

source

fn box_clone(&self) -> Box<dyn KeyManager>

Trait Implementations§

source§

impl Clone for Box<dyn KeyManager>

source§

fn clone(&self) -> Box<dyn KeyManager>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§