pub trait VaultKeyStorage: Send + Sync + Debug + 'static {
    type Error: Display;

    // Required methods
    fn set_vault_key_for(
        &self,
        storage_id: StorageId,
        key: KeyPair
    ) -> Result<(), Self::Error>;
    fn vault_key_for(
        &self,
        storage_id: StorageId
    ) -> Result<Option<KeyPair>, Self::Error>;
}
Expand description

Stores encrypted keys for a vault.

Required Associated Types§

source

type Error: Display

The error type that the functions return.

Required Methods§

source

fn set_vault_key_for( &self, storage_id: StorageId, key: KeyPair ) -> Result<(), Self::Error>

Store a key. Each server id should have unique storage.

source

fn vault_key_for( &self, storage_id: StorageId ) -> Result<Option<KeyPair>, Self::Error>

Retrieve all previously stored vault key for a given storage id.

Implementors§