Skip to content

Commit

Permalink
feat(client-payment-cryptography-data): Make KeyCheckValue field opti…
Browse files Browse the repository at this point in the history
…onal when using asymmetric keys as Key Check Values typically only apply to symmetric keys
  • Loading branch information
awstools committed Aug 31, 2023
1 parent 1d43c19 commit 7c21218
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface EncryptDataCommandOutput extends EncryptDataOutput, __MetadataB
* const response = await client.send(command);
* // { // EncryptDataOutput
* // KeyArn: "STRING_VALUE", // required
* // KeyCheckValue: "STRING_VALUE", // required
* // KeyCheckValue: "STRING_VALUE",
* // CipherText: "STRING_VALUE", // required
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ export interface EncryptDataOutput {
* @public
* <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed. Amazon Web Services Payment Cryptography calculates the KCV by using standard algorithms, typically by encrypting 8 or 16 bytes or "00" or "01" and then truncating the result to the first 3 bytes, or 6 hex digits, of the resulting cryptogram.</p>
*/
KeyCheckValue: string | undefined;
KeyCheckValue?: string;

/**
* @public
Expand Down Expand Up @@ -2931,6 +2931,7 @@ export const MacAttributesFilterSensitiveLog = (obj: MacAttributes): any => {
*/
export const GenerateMacInputFilterSensitiveLog = (obj: GenerateMacInput): any => ({
...obj,
...(obj.MessageData && { MessageData: SENSITIVE_STRING }),
...(obj.GenerationAttributes && { GenerationAttributes: MacAttributesFilterSensitiveLog(obj.GenerationAttributes) }),
});

Expand Down Expand Up @@ -3007,6 +3008,7 @@ export const TranslatePinDataInputFilterSensitiveLog = (obj: TranslatePinDataInp
...(obj.OutgoingTranslationAttributes && {
OutgoingTranslationAttributes: TranslationIsoFormatsFilterSensitiveLog(obj.OutgoingTranslationAttributes),
}),
...(obj.EncryptedPinBlock && { EncryptedPinBlock: SENSITIVE_STRING }),
});

/**
Expand Down Expand Up @@ -3086,6 +3088,8 @@ export const VerifyCardValidationDataInputFilterSensitiveLog = (obj: VerifyCardV
*/
export const VerifyMacInputFilterSensitiveLog = (obj: VerifyMacInput): any => ({
...obj,
...(obj.MessageData && { MessageData: SENSITIVE_STRING }),
...(obj.Mac && { Mac: SENSITIVE_STRING }),
...(obj.VerificationAttributes && {
VerificationAttributes: MacAttributesFilterSensitiveLog(obj.VerificationAttributes),
}),
Expand Down
Loading

0 comments on commit 7c21218

Please sign in to comment.