-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
Copy pathAWSPaymentCryptographyDataClient.java
1442 lines (1306 loc) · 70.8 KB
/
AWSPaymentCryptographyDataClient.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020-2025 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.
*/
package com.amazonaws.services.paymentcryptographydata;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.paymentcryptographydata.AWSPaymentCryptographyDataClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.paymentcryptographydata.model.*;
import com.amazonaws.services.paymentcryptographydata.model.transform.*;
/**
* Client for accessing Payment Cryptography Data Plane. All service calls made using this client are blocking, and will
* not return until the service call completes.
* <p>
* <p>
* You use the Amazon Web Services Payment Cryptography Data Plane to manage how encryption keys are used for
* payment-related transaction processing and associated cryptographic operations. You can encrypt, decrypt, generate,
* verify, and translate payment-related cryptographic operations in Amazon Web Services Payment Cryptography. For more
* information, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/data-operations.html">Data operations</a> in
* the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* To manage your encryption keys, you use the <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/Welcome.html">Amazon Web Services Payment
* Cryptography Control Plane</a>. You can create, import, export, share, manage, and delete keys. You can also manage
* Identity and Access Management (IAM) policies for keys.
* </p>
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSPaymentCryptographyDataClient extends AmazonWebServiceClient implements AWSPaymentCryptographyData {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSPaymentCryptographyData.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "payment-cryptography";
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("application/json")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller(
com.amazonaws.services.paymentcryptographydata.model.transform.AccessDeniedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.paymentcryptographydata.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("VerificationFailedException").withExceptionUnmarshaller(
com.amazonaws.services.paymentcryptographydata.model.transform.VerificationFailedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.paymentcryptographydata.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller(
com.amazonaws.services.paymentcryptographydata.model.transform.ValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller(
com.amazonaws.services.paymentcryptographydata.model.transform.InternalServerExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.paymentcryptographydata.model.AWSPaymentCryptographyDataException.class));
public static AWSPaymentCryptographyDataClientBuilder builder() {
return AWSPaymentCryptographyDataClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on Payment Cryptography Data Plane using the specified
* parameters.
*
* <p>
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSPaymentCryptographyDataClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on Payment Cryptography Data Plane using the specified
* parameters.
*
* <p>
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSPaymentCryptographyDataClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("dataplane.payment-cryptography.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/paymentcryptographydata/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/paymentcryptographydata/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
* <p>
* Decrypts ciphertext data to plaintext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV)
* encryption key scheme. For more information, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/decrypt-data.html">Decrypt data</a> in
* the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* You can use an encryption key generated within Amazon Web Services Payment Cryptography, or you can import your
* own encryption key by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>. For
* this operation, the key must have <code>KeyModesOfUse</code> set to <code>Decrypt</code>. In asymmetric
* decryption, Amazon Web Services Payment Cryptography decrypts the ciphertext using the private component of the
* asymmetric encryption key pair. For data encryption outside of Amazon Web Services Payment Cryptography, you can
* export the public component of the asymmetric key pair by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetPublicKeyCertificate.html"
* >GetPublicCertificate</a>.
* </p>
* <p>
* For symmetric and DUKPT decryption, Amazon Web Services Payment Cryptography supports <code>TDES</code> and
* <code>AES</code> algorithms. For EMV decryption, Amazon Web Services Payment Cryptography supports
* <code>TDES</code> algorithms. For asymmetric decryption, Amazon Web Services Payment Cryptography supports
* <code>RSA</code>.
* </p>
* <p>
* When you use TDES or TDES DUKPT, the ciphertext data length must be a multiple of 8 bytes. For AES or AES DUKPT,
* the ciphertext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless
* padding is enabled.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>EncryptData</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetPublicKeyCertificate.html">
* GetPublicCertificate</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
* </p>
* </li>
* </ul>
*
* @param decryptDataRequest
* @return Result of the DecryptData operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.DecryptData
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/DecryptData"
* target="_top">AWS API Documentation</a>
*/
@Override
public DecryptDataResult decryptData(DecryptDataRequest request) {
request = beforeClientExecution(request);
return executeDecryptData(request);
}
@SdkInternalApi
final DecryptDataResult executeDecryptData(DecryptDataRequest decryptDataRequest) {
ExecutionContext executionContext = createExecutionContext(decryptDataRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DecryptDataRequest> request = null;
Response<DecryptDataResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DecryptDataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(decryptDataRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DecryptData");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<DecryptDataResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DecryptDataResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Encrypts plaintext data to ciphertext using a symmetric (TDES, AES), asymmetric (RSA), or derived (DUKPT or EMV)
* encryption key scheme. For more information, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/encrypt-data.html">Encrypt data</a> in
* the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* You can generate an encryption key within Amazon Web Services Payment Cryptography by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateKey.html">CreateKey</a>. You
* can import your own encryption key by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>. For
* this operation, the key must have <code>KeyModesOfUse</code> set to <code>Encrypt</code>. In asymmetric
* encryption, plaintext is encrypted using public component. You can import the public component of an asymmetric
* key pair created outside Amazon Web Services Payment Cryptography by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>.
* </p>
* <p>
* For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports <code>TDES</code> and
* <code>AES</code> algorithms. For EMV encryption, Amazon Web Services Payment Cryptography supports
* <code>TDES</code> algorithms.For asymmetric encryption, Amazon Web Services Payment Cryptography supports
* <code>RSA</code>.
* </p>
* <p>
* When you use TDES or TDES DUKPT, the plaintext data length must be a multiple of 8 bytes. For AES or AES DUKPT,
* the plaintext data length must be a multiple of 16 bytes. For RSA, it sould be equal to the key size unless
* padding is enabled.
* </p>
* <p>
* To encrypt using DUKPT, you must already have a BDK (Base Derivation Key) key in your account with
* <code>KeyModesOfUse</code> set to <code>DeriveKey</code>, or you can generate a new DUKPT key by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateKey.html">CreateKey</a>. To
* encrypt using EMV, you must already have an IMK (Issuer Master Key) key in your account with
* <code>KeyModesOfUse</code> set to <code>DeriveKey</code>.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>DecryptData</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetPublicKeyCertificate.html">
* GetPublicCertificate</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
* </p>
* </li>
* <li>
* <p>
* <a>ReEncryptData</a>
* </p>
* </li>
* </ul>
*
* @param encryptDataRequest
* @return Result of the EncryptData operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.EncryptData
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/EncryptData"
* target="_top">AWS API Documentation</a>
*/
@Override
public EncryptDataResult encryptData(EncryptDataRequest request) {
request = beforeClientExecution(request);
return executeEncryptData(request);
}
@SdkInternalApi
final EncryptDataResult executeEncryptData(EncryptDataRequest encryptDataRequest) {
ExecutionContext executionContext = createExecutionContext(encryptDataRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<EncryptDataRequest> request = null;
Response<EncryptDataResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new EncryptDataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(encryptDataRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EncryptData");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<EncryptDataResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new EncryptDataResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Generates card-related validation data using algorithms such as Card Verification Values (CVV/CVV2), Dynamic Card
* Verification Values (dCVV/dCVV2), or Card Security Codes (CSC). For more information, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/generate-card-data.html">Generate card
* data</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* This operation generates a CVV or CSC value that is printed on a payment credit or debit card during card
* production. The CVV or CSC, PAN (Primary Account Number) and expiration date of the card are required to check
* its validity during transaction processing. To begin this operation, a CVK (Card Verification Key) encryption key
* is required. You can use <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateKey.html">CreateKey</a> or
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
* to establish a CVK within Amazon Web Services Payment Cryptography. The <code>KeyModesOfUse</code> should be set
* to <code>Generate</code> and <code>Verify</code> for a CVK encryption key.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
* </p>
* </li>
* <li>
* <p>
* <a>VerifyCardValidationData</a>
* </p>
* </li>
* </ul>
*
* @param generateCardValidationDataRequest
* @return Result of the GenerateCardValidationData operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.GenerateCardValidationData
* @see <a
* href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/GenerateCardValidationData"
* target="_top">AWS API Documentation</a>
*/
@Override
public GenerateCardValidationDataResult generateCardValidationData(GenerateCardValidationDataRequest request) {
request = beforeClientExecution(request);
return executeGenerateCardValidationData(request);
}
@SdkInternalApi
final GenerateCardValidationDataResult executeGenerateCardValidationData(GenerateCardValidationDataRequest generateCardValidationDataRequest) {
ExecutionContext executionContext = createExecutionContext(generateCardValidationDataRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GenerateCardValidationDataRequest> request = null;
Response<GenerateCardValidationDataResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GenerateCardValidationDataRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(generateCardValidationDataRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GenerateCardValidationData");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<GenerateCardValidationDataResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GenerateCardValidationDataResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Generates a Message Authentication Code (MAC) cryptogram within Amazon Web Services Payment Cryptography.
* </p>
* <p>
* You can use this operation to authenticate card-related data by using known data values to generate MAC for data
* validation between the sending and receiving parties. This operation uses message data, a secret encryption key
* and MAC algorithm to generate a unique MAC value for transmission. The receiving party of the MAC must use the
* same message data, secret encryption key and MAC algorithm to reproduce another MAC value for comparision.
* </p>
* <p>
* You can use this operation to generate a DUPKT, CMAC, HMAC or EMV MAC by setting generation attributes and
* algorithm to the associated values. The MAC generation encryption key must have valid values for
* <code>KeyUsage</code> such as <code>TR31_M7_HMAC_KEY</code> for HMAC generation, and they key must have
* <code>KeyModesOfUse</code> set to <code>Generate</code> and <code>Verify</code>.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>VerifyMac</a>
* </p>
* </li>
* </ul>
*
* @param generateMacRequest
* @return Result of the GenerateMac operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.GenerateMac
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/GenerateMac"
* target="_top">AWS API Documentation</a>
*/
@Override
public GenerateMacResult generateMac(GenerateMacRequest request) {
request = beforeClientExecution(request);
return executeGenerateMac(request);
}
@SdkInternalApi
final GenerateMacResult executeGenerateMac(GenerateMacRequest generateMacRequest) {
ExecutionContext executionContext = createExecutionContext(generateMacRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GenerateMacRequest> request = null;
Response<GenerateMacResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GenerateMacRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(generateMacRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GenerateMac");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<GenerateMacResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GenerateMacResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Generates pin-related data such as PIN, PIN Verification Value (PVV), PIN Block, and PIN Offset during new card
* issuance or reissuance. For more information, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/generate-pin-data.html">Generate PIN
* data</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* PIN data is never transmitted in clear to or from Amazon Web Services Payment Cryptography. This operation
* generates PIN, PVV, or PIN Offset and then encrypts it using Pin Encryption Key (PEK) to create an
* <code>EncryptedPinBlock</code> for transmission from Amazon Web Services Payment Cryptography. This operation
* uses a separate Pin Verification Key (PVK) for VISA PVV generation.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>GenerateCardValidationData</a>
* </p>
* </li>
* <li>
* <p>
* <a>TranslatePinData</a>
* </p>
* </li>
* <li>
* <p>
* <a>VerifyPinData</a>
* </p>
* </li>
* </ul>
*
* @param generatePinDataRequest
* @return Result of the GeneratePinData operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.GeneratePinData
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/GeneratePinData"
* target="_top">AWS API Documentation</a>
*/
@Override
public GeneratePinDataResult generatePinData(GeneratePinDataRequest request) {
request = beforeClientExecution(request);
return executeGeneratePinData(request);
}
@SdkInternalApi
final GeneratePinDataResult executeGeneratePinData(GeneratePinDataRequest generatePinDataRequest) {
ExecutionContext executionContext = createExecutionContext(generatePinDataRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<GeneratePinDataRequest> request = null;
Response<GeneratePinDataResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GeneratePinDataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(generatePinDataRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GeneratePinData");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<GeneratePinDataResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GeneratePinDataResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Re-encrypt ciphertext using DUKPT or Symmetric data encryption keys.
* </p>
* <p>
* You can either generate an encryption key within Amazon Web Services Payment Cryptography by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateKey.html">CreateKey</a> or
* import your own encryption key by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>. The
* <code>KeyArn</code> for use with this operation must be in a compatible key state with <code>KeyModesOfUse</code>
* set to <code>Encrypt</code>.
* </p>
* <p>
* For symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports <code>TDES</code> and
* <code>AES</code> algorithms. To encrypt using DUKPT, a DUKPT key must already exist within your account with
* <code>KeyModesOfUse</code> set to <code>DeriveKey</code> or a new DUKPT can be generated by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateKey.html">CreateKey</a>.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>DecryptData</a>
* </p>
* </li>
* <li>
* <p>
* <a>EncryptData</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetPublicKeyCertificate.html">
* GetPublicCertificate</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
* </p>
* </li>
* </ul>
*
* @param reEncryptDataRequest
* @return Result of the ReEncryptData operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.ReEncryptData
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/ReEncryptData"
* target="_top">AWS API Documentation</a>
*/
@Override
public ReEncryptDataResult reEncryptData(ReEncryptDataRequest request) {
request = beforeClientExecution(request);
return executeReEncryptData(request);
}
@SdkInternalApi
final ReEncryptDataResult executeReEncryptData(ReEncryptDataRequest reEncryptDataRequest) {
ExecutionContext executionContext = createExecutionContext(reEncryptDataRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<ReEncryptDataRequest> request = null;
Response<ReEncryptDataResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ReEncryptDataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(reEncryptDataRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ReEncryptData");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<ReEncryptDataResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ReEncryptDataResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Translates encrypted PIN block from and to ISO 9564 formats 0,1,3,4. For more information, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/translate-pin-data.html">Translate PIN
* data</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* PIN block translation involves changing the encrytion of PIN block from one encryption key to another encryption
* key and changing PIN block format from one to another without PIN block data leaving Amazon Web Services Payment
* Cryptography. The encryption key transformation can be from PEK (Pin Encryption Key) to BDK (Base Derivation Key)
* for DUKPT or from BDK for DUKPT to PEK. Amazon Web Services Payment Cryptography supports <code>TDES</code> and
* <code>AES</code> key derivation type for DUKPT translations.
* </p>
* <p>
* The allowed combinations of PIN block format translations are guided by PCI. It is important to note that not all
* encrypted PIN block formats (example, format 1) require PAN (Primary Account Number) as input. And as such, PIN
* block format that requires PAN (example, formats 0,3,4) cannot be translated to a format (format 1) that does not
* require a PAN for generation.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <note>
* <p>
* Amazon Web Services Payment Cryptography currently supports ISO PIN block 4 translation for PIN block built using
* legacy PAN length. That is, PAN is the right most 12 digits excluding the check digits.
* </p>
* </note>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>GeneratePinData</a>
* </p>
* </li>
* <li>
* <p>
* <a>VerifyPinData</a>
* </p>
* </li>
* </ul>
*
* @param translatePinDataRequest
* @return Result of the TranslatePinData operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws InternalServerException
* The request processing has failed because of an unknown error, exception, or failure.
* @sample AWSPaymentCryptographyData.TranslatePinData
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-data-2022-02-03/TranslatePinData"
* target="_top">AWS API Documentation</a>
*/
@Override
public TranslatePinDataResult translatePinData(TranslatePinDataRequest request) {
request = beforeClientExecution(request);
return executeTranslatePinData(request);
}
@SdkInternalApi
final TranslatePinDataResult executeTranslatePinData(TranslatePinDataRequest translatePinDataRequest) {
ExecutionContext executionContext = createExecutionContext(translatePinDataRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<TranslatePinDataRequest> request = null;
Response<TranslatePinDataResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TranslatePinDataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(translatePinDataRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Payment Cryptography Data");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TranslatePinData");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler<AmazonWebServiceResponse<TranslatePinDataResult>> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TranslatePinDataResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* <p>
* Verifies Authorization Request Cryptogram (ARQC) for a EMV chip payment card authorization. For more information,
* see <a href=
* "https://docs.aws.amazon.com/payment-cryptography/latest/userguide/data-operations.verifyauthrequestcryptogram.html"
* >Verify auth request cryptogram</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* ARQC generation is done outside of Amazon Web Services Payment Cryptography and is typically generated on a point
* of sale terminal for an EMV chip card to obtain payment authorization during transaction time. For ARQC
* verification, you must first import the ARQC generated outside of Amazon Web Services Payment Cryptography by
* calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>.
* This operation uses the imported ARQC and an major encryption key (DUKPT) created by calling <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateKey.html">CreateKey</a> to
* either provide a boolean ARQC verification result or provide an APRC (Authorization Response Cryptogram) response
* using Method 1 or Method 2. The <code>ARPC_METHOD_1</code> uses <code>AuthResponseCode</code> to generate ARPC
* and <code>ARPC_METHOD_2</code> uses <code>CardStatusUpdate</code> to generate ARPC.
* </p>
* <p>
* For information about valid keys for this operation, see <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html">Understanding
* key attributes</a> and <a
* href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/crypto-ops-validkeys-ops.html">Key types
* for specific data operations</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.
* </p>
* <p>
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.
* </p>
* <p>
* <b>Related operations:</b>
* </p>
* <ul>
* <li>
* <p>
* <a>VerifyCardValidationData</a>
* </p>
* </li>
* <li>
* <p>
* <a>VerifyPinData</a>
* </p>
* </li>
* </ul>
*
* @param verifyAuthRequestCryptogramRequest
* @return Result of the VerifyAuthRequestCryptogram operation returned by the service.
* @throws ValidationException
* The request was denied due to an invalid request error.
* @throws VerificationFailedException
* This request failed verification.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ResourceNotFoundException
* The request was denied due to an invalid resource error.