CmdID

CmdID / aws / aws payment-cryptography-data

aws payment-cryptography-data encrypt-data

Encrypts plaintext data to ciphertext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV) encryption key scheme. AWS CLI reference

1 example 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To encrypt data

The following encrypt-data example encrypts plaintext data using a symmetric key. For this operation, the key must have KeyModesOfUse set to Encrypt and KeyUsage set to TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY.

aws payment-cryptography-data encrypt-data --key-identifier arn:aws:payment-cryptography:us-west-2:123456789012:key/kwapwa6qaifllw2h --plain-text 31323334313233343132333431323334 --encryption-attributes 'Symmetric={Mode=CBC}'Identify
--key-identifierThe keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
--plain-textThe plaintext to be encrypted.
--encryption-attributesThe encryption key type and attributes for plaintext encryption.
Its output
{
    "KeyArn": "arn:aws:payment-cryptography:us-west-2:123456789012:key/kwapwa6qaifllw2h",
    "KeyCheckValue": "71D7AE",
    "CipherText": "33612AB9D6929C3A828EB6030082B2BD"
}

For more information, see Encrypt data in the AWS Payment Cryptography User Guide.

Options

4 in the AWS CLI reference
--encryption-attributesThe encryption key type and attributes for plaintext encryption.
--key-identifierThe keyARN of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
--plain-textThe plaintext to be encrypted.
--wrapped-keyThe WrappedKeyBlock containing the encryption key for plaintext encryption.