pub trait Vault: Debug + Send + Sync + 'static {
    type Error: SendSyncError;
    fn encrypt(&self, payload: &[u8]) -> Result<Vec<u8>, Self::Error>;
fn decrypt(&self, payload: &[u8]) -> Result<Vec<u8>, Self::Error>; }
Expand description

A provider of encryption for blocks of data.

Associated Types

The error type that the vault can produce.

Required methods

Encrypts payload, returning a new buffer that contains all information necessary to decrypt it in the future.

Decrypts a previously encrypted payload, returning the decrypted information.

Implementors