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>
impl<C: Credentials<Token = ServiceToken>> ZeroKMSWithClientKey<C>
pub async fn encrypt(
&self,
payloads: impl IntoIterator<Item = EncryptPayload<'_>>,
dataset_id: Option<Uuid>,
) -> Result<Vec<EncryptedRecord>, Error>
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>
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>
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.
This function will decrypt records from any dataset that the client has access to.
pub async fn decrypt_single(
&self,
payload: EncryptedRecord,
) -> Result<Vec<u8>, Error>
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.