Type Alias ZeroKMSWithClientKey
pub type ZeroKMSWithClientKey<C> = ZeroKMS<C, ClientKey>;Aliased Type§
pub 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<'_>>,
keyset_id: Option<Uuid>,
) -> Result<Vec<EncryptedRecord>, Error>
pub async fn encrypt( &self, payloads: impl IntoIterator<Item = EncryptPayload<'_>>, keyset_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<'_>,
keyset_id: Option<Uuid>,
) -> Result<EncryptedRecord, Error>
pub async fn encrypt_single( &self, payload: EncryptPayload<'_>, keyset_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<P>(
&self,
payloads: impl IntoIterator<Item = P>,
keyset_id: Option<Uuid>,
service_token: Option<ServiceToken>,
unverified_context: Option<UnverifiedContext>,
) -> Result<Vec<Vec<u8>>, Error>where
P: Decryptable,
pub async fn decrypt<P>(
&self,
payloads: impl IntoIterator<Item = P>,
keyset_id: Option<Uuid>,
service_token: Option<ServiceToken>,
unverified_context: Option<UnverifiedContext>,
) -> Result<Vec<Vec<u8>>, Error>where
P: Decryptable,
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 keyset that the client has access to.
pub async fn decrypt_fallible<P>(
&self,
payloads: impl IntoIterator<Item = P>,
service_token: Option<ServiceToken>,
unverified_context: Option<UnverifiedContext>,
) -> Result<Vec<Result<Vec<u8>, RecordDecryptError>>, Error>where
P: Decryptable,
pub async fn decrypt_fallible<P>(
&self,
payloads: impl IntoIterator<Item = P>,
service_token: Option<ServiceToken>,
unverified_context: Option<UnverifiedContext>,
) -> Result<Vec<Result<Vec<u8>, RecordDecryptError>>, Error>where
P: Decryptable,
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 keyset that the client has access to.
pub async fn decrypt_single<P>(
&self,
payload: P,
keyset_id: Option<Uuid>,
service_token: Option<ServiceToken>,
unverified_context: Option<UnverifiedContext>,
) -> Result<Vec<u8>, Error>where
P: Decryptable,
pub async fn decrypt_single<P>(
&self,
payload: P,
keyset_id: Option<Uuid>,
service_token: Option<ServiceToken>,
unverified_context: Option<UnverifiedContext>,
) -> Result<Vec<u8>, Error>where
P: Decryptable,
Decrypt a single EncryptedRecord.
Note that this only works when Self is a ZeroKMSWithClientKey client.