#[non_exhaustive]pub struct DukptEncryptionAttributes {
pub key_serial_number: String,
pub mode: Option<DukptEncryptionMode>,
pub dukpt_key_derivation_type: Option<DukptDerivationType>,
pub dukpt_key_variant: Option<DukptKeyVariant>,
pub initialization_vector: Option<String>,
}
Expand description
Parameters that are required to encrypt plaintext data using DUKPT.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.key_serial_number: String
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.
mode: Option<DukptEncryptionMode>
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.
dukpt_key_derivation_type: Option<DukptDerivationType>
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
dukpt_key_variant: Option<DukptKeyVariant>
The type of use of DUKPT, which can be incoming data decryption, outgoing data encryption, or both.
initialization_vector: Option<String>
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.
Implementations§
source§impl DukptEncryptionAttributes
impl DukptEncryptionAttributes
sourcepub fn key_serial_number(&self) -> &str
pub fn key_serial_number(&self) -> &str
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.
sourcepub fn mode(&self) -> Option<&DukptEncryptionMode>
pub fn mode(&self) -> Option<&DukptEncryptionMode>
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.
sourcepub fn dukpt_key_derivation_type(&self) -> Option<&DukptDerivationType>
pub fn dukpt_key_derivation_type(&self) -> Option<&DukptDerivationType>
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
sourcepub fn dukpt_key_variant(&self) -> Option<&DukptKeyVariant>
pub fn dukpt_key_variant(&self) -> Option<&DukptKeyVariant>
The type of use of DUKPT, which can be incoming data decryption, outgoing data encryption, or both.
sourcepub fn initialization_vector(&self) -> Option<&str>
pub fn initialization_vector(&self) -> Option<&str>
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.
source§impl DukptEncryptionAttributes
impl DukptEncryptionAttributes
sourcepub fn builder() -> DukptEncryptionAttributesBuilder
pub fn builder() -> DukptEncryptionAttributesBuilder
Creates a new builder-style object to manufacture DukptEncryptionAttributes
.
Trait Implementations§
source§impl Clone for DukptEncryptionAttributes
impl Clone for DukptEncryptionAttributes
source§fn clone(&self) -> DukptEncryptionAttributes
fn clone(&self) -> DukptEncryptionAttributes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DukptEncryptionAttributes
impl Debug for DukptEncryptionAttributes
source§impl PartialEq for DukptEncryptionAttributes
impl PartialEq for DukptEncryptionAttributes
source§fn eq(&self, other: &DukptEncryptionAttributes) -> bool
fn eq(&self, other: &DukptEncryptionAttributes) -> bool
self
and other
values to be equal, and is used
by ==
.