pub trait KmsAeadEnvelopeEncryption<Aad> {
// Required methods
fn encrypt_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherTextWithEncryptedKey>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn decrypt_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherTextWithEncryptedKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn encrypt_value_with_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
dek: &'life3 DataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherText>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn encrypt_value_with_encrypted_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
dek: &'life3 EncryptedDataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherText>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn decrypt_value_with_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherText,
data_encryption_key: &'life3 DataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn decrypt_value_with_encrypted_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherText,
encrypted_data_encryption_key: &'life3 EncryptedDataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn generate_new_dek<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<(DataEncryptionKey, EncryptedDataEncryptionKey)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A trait that defines the envelope encryption and decryption of a value using a data encryption key (DEK), a key encryption key (KEK) from KMS providers, and additional authenticated data (AEAD).
Required Methods§
Sourcefn encrypt_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherTextWithEncryptedKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn encrypt_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherTextWithEncryptedKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Encrypts the plain text using a new data encryption key.
Sourcefn decrypt_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherTextWithEncryptedKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn decrypt_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherTextWithEncryptedKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Decrypts the cipher text using the cipher text with corresponding encrypted data encryption key.
Sourcefn encrypt_value_with_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
dek: &'life3 DataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherText>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn encrypt_value_with_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
dek: &'life3 DataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherText>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Encrypts the plain text using the provided data encryption key.
Sourcefn encrypt_value_with_encrypted_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
dek: &'life3 EncryptedDataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherText>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn encrypt_value_with_encrypted_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
plain_text: &'life2 SecretValue,
dek: &'life3 EncryptedDataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<CipherText>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Encrypts the plain text using the provided encrypted data encryption key.
Sourcefn decrypt_value_with_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherText,
data_encryption_key: &'life3 DataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn decrypt_value_with_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherText,
data_encryption_key: &'life3 DataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Decrypts the cipher text using the provided encrypted data encryption key.
Sourcefn decrypt_value_with_encrypted_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherText,
encrypted_data_encryption_key: &'life3 EncryptedDataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn decrypt_value_with_encrypted_dek<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
aad: &'life1 Aad,
cipher_text: &'life2 CipherText,
encrypted_data_encryption_key: &'life3 EncryptedDataEncryptionKey,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Decrypts the cipher text using the provided encrypted data encryption key.
Sourcefn generate_new_dek<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<(DataEncryptionKey, EncryptedDataEncryptionKey)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_new_dek<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = KmsAeadResult<(DataEncryptionKey, EncryptedDataEncryptionKey)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generates a new data encryption key and encrypts it using the KMS provider.