/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace PaymentCryptographyData { namespace Model { /** *

Parameters that are required to encrypt plaintext data using * DUKPT.

See Also:

AWS * API Reference

*/ class DukptEncryptionAttributes { public: AWS_PAYMENTCRYPTOGRAPHYDATA_API DukptEncryptionAttributes(); AWS_PAYMENTCRYPTOGRAPHYDATA_API DukptEncryptionAttributes(Aws::Utils::Json::JsonView jsonValue); AWS_PAYMENTCRYPTOGRAPHYDATA_API DukptEncryptionAttributes& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_PAYMENTCRYPTOGRAPHYDATA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key * Serial Number (KSN). This must be less than or equal to the strength of the BDK. * For example, you can't use AES_128 as a derivation type for a BDK * of AES_128 or TDES_2KEY

*/ inline const DukptDerivationType& GetDukptKeyDerivationType() const{ return m_dukptKeyDerivationType; } /** *

The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key * Serial Number (KSN). This must be less than or equal to the strength of the BDK. * For example, you can't use AES_128 as a derivation type for a BDK * of AES_128 or TDES_2KEY

*/ inline bool DukptKeyDerivationTypeHasBeenSet() const { return m_dukptKeyDerivationTypeHasBeenSet; } /** *

The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key * Serial Number (KSN). This must be less than or equal to the strength of the BDK. * For example, you can't use AES_128 as a derivation type for a BDK * of AES_128 or TDES_2KEY

*/ inline void SetDukptKeyDerivationType(const DukptDerivationType& value) { m_dukptKeyDerivationTypeHasBeenSet = true; m_dukptKeyDerivationType = value; } /** *

The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key * Serial Number (KSN). This must be less than or equal to the strength of the BDK. * For example, you can't use AES_128 as a derivation type for a BDK * of AES_128 or TDES_2KEY

*/ inline void SetDukptKeyDerivationType(DukptDerivationType&& value) { m_dukptKeyDerivationTypeHasBeenSet = true; m_dukptKeyDerivationType = std::move(value); } /** *

The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key * Serial Number (KSN). This must be less than or equal to the strength of the BDK. * For example, you can't use AES_128 as a derivation type for a BDK * of AES_128 or TDES_2KEY

*/ inline DukptEncryptionAttributes& WithDukptKeyDerivationType(const DukptDerivationType& value) { SetDukptKeyDerivationType(value); return *this;} /** *

The key type encrypted using DUKPT from a Base Derivation Key (BDK) and Key * Serial Number (KSN). This must be less than or equal to the strength of the BDK. * For example, you can't use AES_128 as a derivation type for a BDK * of AES_128 or TDES_2KEY

*/ inline DukptEncryptionAttributes& WithDukptKeyDerivationType(DukptDerivationType&& value) { SetDukptKeyDerivationType(std::move(value)); return *this;} /** *

The type of use of DUKPT, which can be incoming data decryption, outgoing * data encryption, or both.

*/ inline const DukptKeyVariant& GetDukptKeyVariant() const{ return m_dukptKeyVariant; } /** *

The type of use of DUKPT, which can be incoming data decryption, outgoing * data encryption, or both.

*/ inline bool DukptKeyVariantHasBeenSet() const { return m_dukptKeyVariantHasBeenSet; } /** *

The type of use of DUKPT, which can be incoming data decryption, outgoing * data encryption, or both.

*/ inline void SetDukptKeyVariant(const DukptKeyVariant& value) { m_dukptKeyVariantHasBeenSet = true; m_dukptKeyVariant = value; } /** *

The type of use of DUKPT, which can be incoming data decryption, outgoing * data encryption, or both.

*/ inline void SetDukptKeyVariant(DukptKeyVariant&& value) { m_dukptKeyVariantHasBeenSet = true; m_dukptKeyVariant = std::move(value); } /** *

The type of use of DUKPT, which can be incoming data decryption, outgoing * data encryption, or both.

*/ inline DukptEncryptionAttributes& WithDukptKeyVariant(const DukptKeyVariant& value) { SetDukptKeyVariant(value); return *this;} /** *

The type of use of DUKPT, which can be incoming data decryption, outgoing * data encryption, or both.

*/ inline DukptEncryptionAttributes& WithDukptKeyVariant(DukptKeyVariant&& value) { SetDukptKeyVariant(std::move(value)); return *this;} /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline const Aws::String& GetInitializationVector() const{ return m_initializationVector; } /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline bool InitializationVectorHasBeenSet() const { return m_initializationVectorHasBeenSet; } /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline void SetInitializationVector(const Aws::String& value) { m_initializationVectorHasBeenSet = true; m_initializationVector = value; } /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline void SetInitializationVector(Aws::String&& value) { m_initializationVectorHasBeenSet = true; m_initializationVector = std::move(value); } /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline void SetInitializationVector(const char* value) { m_initializationVectorHasBeenSet = true; m_initializationVector.assign(value); } /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline DukptEncryptionAttributes& WithInitializationVector(const Aws::String& value) { SetInitializationVector(value); return *this;} /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline DukptEncryptionAttributes& WithInitializationVector(Aws::String&& value) { SetInitializationVector(std::move(value)); return *this;} /** *

An input to cryptographic primitive used to provide the intial state. * Typically the InitializationVector must have a random or * psuedo-random value, but sometimes it only needs to be unpredictable or unique. * If you don't provide a value, Amazon Web Services Payment Cryptography generates * a random value.

*/ inline DukptEncryptionAttributes& WithInitializationVector(const char* value) { SetInitializationVector(value); return *this;} /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline const Aws::String& GetKeySerialNumber() const{ return m_keySerialNumber; } /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline bool KeySerialNumberHasBeenSet() const { return m_keySerialNumberHasBeenSet; } /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline void SetKeySerialNumber(const Aws::String& value) { m_keySerialNumberHasBeenSet = true; m_keySerialNumber = value; } /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline void SetKeySerialNumber(Aws::String&& value) { m_keySerialNumberHasBeenSet = true; m_keySerialNumber = std::move(value); } /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline void SetKeySerialNumber(const char* value) { m_keySerialNumberHasBeenSet = true; m_keySerialNumber.assign(value); } /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline DukptEncryptionAttributes& WithKeySerialNumber(const Aws::String& value) { SetKeySerialNumber(value); return *this;} /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline DukptEncryptionAttributes& WithKeySerialNumber(Aws::String&& value) { SetKeySerialNumber(std::move(value)); return *this;} /** *

The unique identifier known as Key Serial Number (KSN) that comes from an * encrypting device using DUKPT encryption method. The KSN is derived from the * encrypting device unique identifier and an internal transaction counter.

*/ inline DukptEncryptionAttributes& WithKeySerialNumber(const char* value) { SetKeySerialNumber(value); return *this;} /** *

The block cipher mode of operation. Block ciphers are designed to encrypt a * block of data of fixed size, for example, 128 bits. The size of the input block * is usually same as the size of the encrypted output block, while the key length * can be different. A mode of operation describes how to repeatedly apply a * cipher's single-block operation to securely transform amounts of data larger * than a block.

The default is CBC.

*/ inline const DukptEncryptionMode& GetMode() const{ return m_mode; } /** *

The block cipher mode of operation. Block ciphers are designed to encrypt a * block of data of fixed size, for example, 128 bits. The size of the input block * is usually same as the size of the encrypted output block, while the key length * can be different. A mode of operation describes how to repeatedly apply a * cipher's single-block operation to securely transform amounts of data larger * than a block.

The default is CBC.

*/ inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; } /** *

The block cipher mode of operation. Block ciphers are designed to encrypt a * block of data of fixed size, for example, 128 bits. The size of the input block * is usually same as the size of the encrypted output block, while the key length * can be different. A mode of operation describes how to repeatedly apply a * cipher's single-block operation to securely transform amounts of data larger * than a block.

The default is CBC.

*/ inline void SetMode(const DukptEncryptionMode& value) { m_modeHasBeenSet = true; m_mode = value; } /** *

The block cipher mode of operation. Block ciphers are designed to encrypt a * block of data of fixed size, for example, 128 bits. The size of the input block * is usually same as the size of the encrypted output block, while the key length * can be different. A mode of operation describes how to repeatedly apply a * cipher's single-block operation to securely transform amounts of data larger * than a block.

The default is CBC.

*/ inline void SetMode(DukptEncryptionMode&& value) { m_modeHasBeenSet = true; m_mode = std::move(value); } /** *

The block cipher mode of operation. Block ciphers are designed to encrypt a * block of data of fixed size, for example, 128 bits. The size of the input block * is usually same as the size of the encrypted output block, while the key length * can be different. A mode of operation describes how to repeatedly apply a * cipher's single-block operation to securely transform amounts of data larger * than a block.

The default is CBC.

*/ inline DukptEncryptionAttributes& WithMode(const DukptEncryptionMode& value) { SetMode(value); return *this;} /** *

The block cipher mode of operation. Block ciphers are designed to encrypt a * block of data of fixed size, for example, 128 bits. The size of the input block * is usually same as the size of the encrypted output block, while the key length * can be different. A mode of operation describes how to repeatedly apply a * cipher's single-block operation to securely transform amounts of data larger * than a block.

The default is CBC.

*/ inline DukptEncryptionAttributes& WithMode(DukptEncryptionMode&& value) { SetMode(std::move(value)); return *this;} private: DukptDerivationType m_dukptKeyDerivationType; bool m_dukptKeyDerivationTypeHasBeenSet = false; DukptKeyVariant m_dukptKeyVariant; bool m_dukptKeyVariantHasBeenSet = false; Aws::String m_initializationVector; bool m_initializationVectorHasBeenSet = false; Aws::String m_keySerialNumber; bool m_keySerialNumberHasBeenSet = false; DukptEncryptionMode m_mode; bool m_modeHasBeenSet = false; }; } // namespace Model } // namespace PaymentCryptographyData } // namespace Aws