Struct aws_sdk_paymentcryptographydata::operation::encrypt_data::builders::EncryptDataFluentBuilder
source · pub struct EncryptDataFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to EncryptData
.
Encrypts plaintext data to ciphertext using symmetric, asymmetric, or DUKPT data encryption key. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide.
You can generate an encryption key within Amazon Web Services Payment Cryptography by calling CreateKey. You can import your own encryption key by calling ImportKey. For this operation, the key must have KeyModesOfUse
set to Encrypt
. In asymmetric encryption, plaintext is encrypted using public component. You can import the public component of an asymmetric key pair created outside Amazon Web Services Payment Cryptography by calling ImportKey).
for symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports TDES
and AES
algorithms. For asymmetric encryption, Amazon Web Services Payment Cryptography supports RSA
. To encrypt using DUKPT, you must already have a DUKPT key in your account with KeyModesOfUse
set to DeriveKey
, or you can generate a new DUKPT key by calling CreateKey.
For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.
Cross-account use: This operation can't be used across different Amazon Web Services accounts.
Related operations:
-
DecryptData
-
ReEncryptData
Implementations§
source§impl EncryptDataFluentBuilder
impl EncryptDataFluentBuilder
sourcepub fn as_input(&self) -> &EncryptDataInputBuilder
pub fn as_input(&self) -> &EncryptDataInputBuilder
Access the EncryptData as a reference.
sourcepub async fn send(
self
) -> Result<EncryptDataOutput, SdkError<EncryptDataError, HttpResponse>>
pub async fn send( self ) -> Result<EncryptDataOutput, SdkError<EncryptDataError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<EncryptDataOutput, EncryptDataError, Self>, SdkError<EncryptDataError>>
pub async fn customize( self ) -> Result<CustomizableOperation<EncryptDataOutput, EncryptDataError, Self>, SdkError<EncryptDataError>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn key_identifier(self, input: impl Into<String>) -> Self
pub fn key_identifier(self, input: impl Into<String>) -> Self
The keyARN
of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
sourcepub fn set_key_identifier(self, input: Option<String>) -> Self
pub fn set_key_identifier(self, input: Option<String>) -> Self
The keyARN
of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
sourcepub fn get_key_identifier(&self) -> &Option<String>
pub fn get_key_identifier(&self) -> &Option<String>
The keyARN
of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
sourcepub fn plain_text(self, input: impl Into<String>) -> Self
pub fn plain_text(self, input: impl Into<String>) -> Self
The plaintext to be encrypted.
sourcepub fn set_plain_text(self, input: Option<String>) -> Self
pub fn set_plain_text(self, input: Option<String>) -> Self
The plaintext to be encrypted.
sourcepub fn get_plain_text(&self) -> &Option<String>
pub fn get_plain_text(&self) -> &Option<String>
The plaintext to be encrypted.
sourcepub fn encryption_attributes(
self,
input: EncryptionDecryptionAttributes
) -> Self
pub fn encryption_attributes( self, input: EncryptionDecryptionAttributes ) -> Self
The encryption key type and attributes for plaintext encryption.
sourcepub fn set_encryption_attributes(
self,
input: Option<EncryptionDecryptionAttributes>
) -> Self
pub fn set_encryption_attributes( self, input: Option<EncryptionDecryptionAttributes> ) -> Self
The encryption key type and attributes for plaintext encryption.
sourcepub fn get_encryption_attributes(
&self
) -> &Option<EncryptionDecryptionAttributes>
pub fn get_encryption_attributes( &self ) -> &Option<EncryptionDecryptionAttributes>
The encryption key type and attributes for plaintext encryption.
Trait Implementations§
source§impl Clone for EncryptDataFluentBuilder
impl Clone for EncryptDataFluentBuilder
source§fn clone(&self) -> EncryptDataFluentBuilder
fn clone(&self) -> EncryptDataFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more