Trait bonsaidb::local::vault::AnyVaultKeyStorage[][src]

pub trait AnyVaultKeyStorage: 'static + Send + Sync + Debug {
    fn vault_key_for(
        &self,
        storage_id: StorageId
    ) -> Result<Option<KeyPair>, Error>;
fn set_vault_key_for(
        &self,
        storage_id: StorageId,
        key: KeyPair
    ) -> Result<(), Error>; }
Expand description

A VaultKeyStorage trait that wraps the Error type before returning. This type is used to allow the Vault to operate without any generic parameters. This trait is auto-implemented for all VaultKeyStorage implementors.

Required methods

Retrieve all previously stored master keys for a given storage id.

Store a key. Each server id should have unique storage. The keys are uniquely encrypted per storage id and can only be decrypted by keys contained in the storage itself.

Implementors