cipherstash_client::zerokms

Type Alias ZeroKMSWithClientKey

pub type ZeroKMSWithClientKey<C> = ZeroKMS<C, ClientKey>;

Aliased Type§

struct ZeroKMSWithClientKey<C> { /* private fields */ }

Implementations§

§

impl<C: Credentials<Token = ServiceToken>> ZeroKMSWithClientKey<C>

pub async fn save_dataset_config( &self, config: DatasetConfig, ) -> Result<DatasetConfigWithIndexRootKey, Error>

Save a configuration file to the current dataset.

The DatasetConfig is used by Proxy to store index and column encryption configuration.

pub async fn load_dataset_config( &self, ) -> Result<DatasetConfigWithIndexRootKey, Error>

Retrieve the DatasetConfig for the current dataset.

pub async fn encrypt( &self, payloads: impl IntoIterator<Item = EncryptPayload<'_>>, dataset_id: Option<Uuid>, ) -> Result<Vec<EncryptedRecord>, Error>

Encrypt a stream of EncryptPayload and return them as an EncryptedRecord. Note that this only works when Self is a ZeroKMSWithClientKey client.

pub async fn encrypt_single( &self, payload: EncryptPayload<'_>, dataset_id: Option<Uuid>, ) -> Result<EncryptedRecord, Error>

Encrypt a single EncryptPayload. Note that this only works when Self is a ZeroKMSWithClientKey client.

pub async fn decrypt( &self, payloads: impl IntoIterator<Item = EncryptedRecord>, ) -> Result<Vec<Vec<u8>>, Error>

Decrypt a stream of EncryptedRecord and return the raw decrypted binary blob. Note that this only works when Self is a ZeroKMSWithClientKey client.

pub async fn decrypt_single( &self, payload: EncryptedRecord, ) -> Result<Vec<u8>, Error>

Decrypt a single EncryptedRecord. Note that this only works when Self is a ZeroKMSWithClientKey client.