/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the payment-cryptography-data-2022-02-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.PaymentCryptographyData.Model
{
///
/// Container for the parameters to the VerifyMac operation.
/// Verifies a Message Authentication Code (MAC).
///
///
///
/// You can use this operation when keys won't be shared but mutual data is present on
/// both ends for validation. In this case, known data values are used to generate a MAC
/// on both ends for verification without sending or receiving data in ciphertext or plaintext.
/// You can use this operation to verify a DUPKT, HMAC or EMV MAC by setting generation
/// attributes and algorithm to the associated values. Use the same encryption key for
/// MAC verification as you use for GenerateMac.
///
///
///
/// For information about valid keys for this operation, see Understanding
/// key attributes and Key
/// types for specific data operations in the Amazon Web Services Payment Cryptography
/// User Guide.
///
///
///
/// Cross-account use: This operation can't be used across different Amazon Web
/// Services accounts.
///
///
///
/// Related operations:
///
///
///
public partial class VerifyMacRequest : AmazonPaymentCryptographyDataRequest
{
private string _keyIdentifier;
private string _mac;
private int? _macLength;
private string _messageData;
private MacAttributes _verificationAttributes;
///
/// Gets and sets the property KeyIdentifier.
///
/// The keyARN
of the encryption key that Amazon Web Services Payment Cryptography
/// uses to verify MAC data.
///
///
[AWSProperty(Required=true, Min=7, Max=322)]
public string KeyIdentifier
{
get { return this._keyIdentifier; }
set { this._keyIdentifier = value; }
}
// Check to see if KeyIdentifier property is set
internal bool IsSetKeyIdentifier()
{
return this._keyIdentifier != null;
}
///
/// Gets and sets the property Mac.
///
/// The MAC being verified.
///
///
[AWSProperty(Required=true, Min=4, Max=128)]
public string Mac
{
get { return this._mac; }
set { this._mac = value; }
}
// Check to see if Mac property is set
internal bool IsSetMac()
{
return this._mac != null;
}
///
/// Gets and sets the property MacLength.
///
/// The length of the MAC.
///
///
[AWSProperty(Min=4, Max=16)]
public int MacLength
{
get { return this._macLength.GetValueOrDefault(); }
set { this._macLength = value; }
}
// Check to see if MacLength property is set
internal bool IsSetMacLength()
{
return this._macLength.HasValue;
}
///
/// Gets and sets the property MessageData.
///
/// The data on for which MAC is under verification.
///
///
[AWSProperty(Required=true, Min=2, Max=4096)]
public string MessageData
{
get { return this._messageData; }
set { this._messageData = value; }
}
// Check to see if MessageData property is set
internal bool IsSetMessageData()
{
return this._messageData != null;
}
///
/// Gets and sets the property VerificationAttributes.
///
/// The attributes and data values to use for MAC verification within Amazon Web Services
/// Payment Cryptography.
///
///
[AWSProperty(Required=true)]
public MacAttributes VerificationAttributes
{
get { return this._verificationAttributes; }
set { this._verificationAttributes = value; }
}
// Check to see if VerificationAttributes property is set
internal bool IsSetVerificationAttributes()
{
return this._verificationAttributes != null;
}
}
}