#[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 method to use for encryption.
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 used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero.
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 method to use for encryption.
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 used to provide the intial state. If no value is provided, Amazon Web Services Payment Cryptography defaults it to zero.
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 ==
.impl StructuralPartialEq for DukptEncryptionAttributes
Auto Trait Implementations§
impl Freeze for DukptEncryptionAttributes
impl RefUnwindSafe for DukptEncryptionAttributes
impl Send for DukptEncryptionAttributes
impl Sync for DukptEncryptionAttributes
impl Unpin for DukptEncryptionAttributes
impl UnwindSafe for DukptEncryptionAttributes
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more