@aws-sdk/client-payment-cryptography-data 3.349.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +294 -0
- package/dist-cjs/PaymentCryptographyData.js +33 -0
- package/dist-cjs/PaymentCryptographyDataClient.js +41 -0
- package/dist-cjs/commands/DecryptDataCommand.js +47 -0
- package/dist-cjs/commands/EncryptDataCommand.js +47 -0
- package/dist-cjs/commands/GenerateCardValidationDataCommand.js +47 -0
- package/dist-cjs/commands/GenerateMacCommand.js +47 -0
- package/dist-cjs/commands/GeneratePinDataCommand.js +47 -0
- package/dist-cjs/commands/ReEncryptDataCommand.js +47 -0
- package/dist-cjs/commands/TranslatePinDataCommand.js +47 -0
- package/dist-cjs/commands/VerifyAuthRequestCryptogramCommand.js +47 -0
- package/dist-cjs/commands/VerifyCardValidationDataCommand.js +47 -0
- package/dist-cjs/commands/VerifyMacCommand.js +47 -0
- package/dist-cjs/commands/VerifyPinDataCommand.js +47 -0
- package/dist-cjs/commands/index.js +14 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/PaymentCryptographyDataServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +526 -0
- package/dist-cjs/protocols/Aws_restJson1.js +963 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +48 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +21 -0
- package/dist-es/PaymentCryptographyData.js +29 -0
- package/dist-es/PaymentCryptographyDataClient.js +37 -0
- package/dist-es/commands/DecryptDataCommand.js +43 -0
- package/dist-es/commands/EncryptDataCommand.js +43 -0
- package/dist-es/commands/GenerateCardValidationDataCommand.js +43 -0
- package/dist-es/commands/GenerateMacCommand.js +43 -0
- package/dist-es/commands/GeneratePinDataCommand.js +43 -0
- package/dist-es/commands/ReEncryptDataCommand.js +43 -0
- package/dist-es/commands/TranslatePinDataCommand.js +43 -0
- package/dist-es/commands/VerifyAuthRequestCryptogramCommand.js +43 -0
- package/dist-es/commands/VerifyCardValidationDataCommand.js +43 -0
- package/dist-es/commands/VerifyMacCommand.js +43 -0
- package/dist-es/commands/VerifyPinDataCommand.js +43 -0
- package/dist-es/commands/index.js +11 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/PaymentCryptographyDataServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +488 -0
- package/dist-es/protocols/Aws_restJson1.js +938 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +17 -0
- package/dist-types/PaymentCryptographyData.d.ts +88 -0
- package/dist-types/PaymentCryptographyDataClient.d.ts +174 -0
- package/dist-types/commands/DecryptDataCommand.d.ts +133 -0
- package/dist-types/commands/EncryptDataCommand.d.ts +138 -0
- package/dist-types/commands/GenerateCardValidationDataCommand.d.ts +144 -0
- package/dist-types/commands/GenerateMacCommand.d.ts +134 -0
- package/dist-types/commands/GeneratePinDataCommand.d.ts +155 -0
- package/dist-types/commands/ReEncryptDataCommand.d.ts +150 -0
- package/dist-types/commands/TranslatePinDataCommand.d.ts +147 -0
- package/dist-types/commands/VerifyAuthRequestCryptogramCommand.d.ts +150 -0
- package/dist-types/commands/VerifyCardValidationDataCommand.d.ts +156 -0
- package/dist-types/commands/VerifyMacCommand.d.ts +137 -0
- package/dist-types/commands/VerifyPinDataCommand.d.ts +134 -0
- package/dist-types/commands/index.d.ts +11 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +20 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +11 -0
- package/dist-types/models/PaymentCryptographyDataServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2191 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +101 -0
- package/dist-types/runtimeConfig.browser.d.ts +42 -0
- package/dist-types/runtimeConfig.d.ts +42 -0
- package/dist-types/runtimeConfig.native.d.ts +41 -0
- package/dist-types/runtimeConfig.shared.d.ts +18 -0
- package/dist-types/ts3.4/PaymentCryptographyData.d.ts +194 -0
- package/dist-types/ts3.4/PaymentCryptographyDataClient.d.ts +181 -0
- package/dist-types/ts3.4/commands/DecryptDataCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/EncryptDataCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GenerateCardValidationDataCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GenerateMacCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GeneratePinDataCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ReEncryptDataCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/TranslatePinDataCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/VerifyAuthRequestCryptogramCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/VerifyCardValidationDataCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/VerifyMacCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/VerifyPinDataCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +11 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +5 -0
- package/dist-types/ts3.4/models/PaymentCryptographyDataServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1168 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +137 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +96 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +20 -0
- package/package.json +99 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
4
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
+
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
6
|
+
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
7
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/util-retry";
|
|
8
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
24
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
3
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
4
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
|
+
import { Hash } from "@aws-sdk/hash-node";
|
|
6
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
7
|
+
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
8
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
9
|
+
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
10
|
+
import { DEFAULT_RETRY_MODE } from "@aws-sdk/util-retry";
|
|
11
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
12
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
15
|
+
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
16
|
+
export const getRuntimeConfig = (config) => {
|
|
17
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
18
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
return {
|
|
22
|
+
...clientSharedValues,
|
|
23
|
+
...config,
|
|
24
|
+
runtime: "node",
|
|
25
|
+
defaultsMode,
|
|
26
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
27
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
28
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
29
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
31
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
32
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
33
|
+
retryMode: config?.retryMode ??
|
|
34
|
+
loadNodeConfig({
|
|
35
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
+
}),
|
|
38
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
40
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
41
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NoOpLogger } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { parseUrl } from "@aws-sdk/url-parser";
|
|
3
|
+
import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
|
|
4
|
+
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8";
|
|
5
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
6
|
+
export const getRuntimeConfig = (config) => ({
|
|
7
|
+
apiVersion: "2022-02-03",
|
|
8
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
9
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
11
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
12
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
13
|
+
serviceId: config?.serviceId ?? "Payment Cryptography Data",
|
|
14
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
15
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
16
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
17
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
|
+
import { DecryptDataCommandInput, DecryptDataCommandOutput } from "./commands/DecryptDataCommand";
|
|
3
|
+
import { EncryptDataCommandInput, EncryptDataCommandOutput } from "./commands/EncryptDataCommand";
|
|
4
|
+
import { GenerateCardValidationDataCommandInput, GenerateCardValidationDataCommandOutput } from "./commands/GenerateCardValidationDataCommand";
|
|
5
|
+
import { GenerateMacCommandInput, GenerateMacCommandOutput } from "./commands/GenerateMacCommand";
|
|
6
|
+
import { GeneratePinDataCommandInput, GeneratePinDataCommandOutput } from "./commands/GeneratePinDataCommand";
|
|
7
|
+
import { ReEncryptDataCommandInput, ReEncryptDataCommandOutput } from "./commands/ReEncryptDataCommand";
|
|
8
|
+
import { TranslatePinDataCommandInput, TranslatePinDataCommandOutput } from "./commands/TranslatePinDataCommand";
|
|
9
|
+
import { VerifyAuthRequestCryptogramCommandInput, VerifyAuthRequestCryptogramCommandOutput } from "./commands/VerifyAuthRequestCryptogramCommand";
|
|
10
|
+
import { VerifyCardValidationDataCommandInput, VerifyCardValidationDataCommandOutput } from "./commands/VerifyCardValidationDataCommand";
|
|
11
|
+
import { VerifyMacCommandInput, VerifyMacCommandOutput } from "./commands/VerifyMacCommand";
|
|
12
|
+
import { VerifyPinDataCommandInput, VerifyPinDataCommandOutput } from "./commands/VerifyPinDataCommand";
|
|
13
|
+
import { PaymentCryptographyDataClient } from "./PaymentCryptographyDataClient";
|
|
14
|
+
export interface PaymentCryptographyData {
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link DecryptDataCommand}
|
|
17
|
+
*/
|
|
18
|
+
decryptData(args: DecryptDataCommandInput, options?: __HttpHandlerOptions): Promise<DecryptDataCommandOutput>;
|
|
19
|
+
decryptData(args: DecryptDataCommandInput, cb: (err: any, data?: DecryptDataCommandOutput) => void): void;
|
|
20
|
+
decryptData(args: DecryptDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DecryptDataCommandOutput) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* @see {@link EncryptDataCommand}
|
|
23
|
+
*/
|
|
24
|
+
encryptData(args: EncryptDataCommandInput, options?: __HttpHandlerOptions): Promise<EncryptDataCommandOutput>;
|
|
25
|
+
encryptData(args: EncryptDataCommandInput, cb: (err: any, data?: EncryptDataCommandOutput) => void): void;
|
|
26
|
+
encryptData(args: EncryptDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EncryptDataCommandOutput) => void): void;
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link GenerateCardValidationDataCommand}
|
|
29
|
+
*/
|
|
30
|
+
generateCardValidationData(args: GenerateCardValidationDataCommandInput, options?: __HttpHandlerOptions): Promise<GenerateCardValidationDataCommandOutput>;
|
|
31
|
+
generateCardValidationData(args: GenerateCardValidationDataCommandInput, cb: (err: any, data?: GenerateCardValidationDataCommandOutput) => void): void;
|
|
32
|
+
generateCardValidationData(args: GenerateCardValidationDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateCardValidationDataCommandOutput) => void): void;
|
|
33
|
+
/**
|
|
34
|
+
* @see {@link GenerateMacCommand}
|
|
35
|
+
*/
|
|
36
|
+
generateMac(args: GenerateMacCommandInput, options?: __HttpHandlerOptions): Promise<GenerateMacCommandOutput>;
|
|
37
|
+
generateMac(args: GenerateMacCommandInput, cb: (err: any, data?: GenerateMacCommandOutput) => void): void;
|
|
38
|
+
generateMac(args: GenerateMacCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateMacCommandOutput) => void): void;
|
|
39
|
+
/**
|
|
40
|
+
* @see {@link GeneratePinDataCommand}
|
|
41
|
+
*/
|
|
42
|
+
generatePinData(args: GeneratePinDataCommandInput, options?: __HttpHandlerOptions): Promise<GeneratePinDataCommandOutput>;
|
|
43
|
+
generatePinData(args: GeneratePinDataCommandInput, cb: (err: any, data?: GeneratePinDataCommandOutput) => void): void;
|
|
44
|
+
generatePinData(args: GeneratePinDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GeneratePinDataCommandOutput) => void): void;
|
|
45
|
+
/**
|
|
46
|
+
* @see {@link ReEncryptDataCommand}
|
|
47
|
+
*/
|
|
48
|
+
reEncryptData(args: ReEncryptDataCommandInput, options?: __HttpHandlerOptions): Promise<ReEncryptDataCommandOutput>;
|
|
49
|
+
reEncryptData(args: ReEncryptDataCommandInput, cb: (err: any, data?: ReEncryptDataCommandOutput) => void): void;
|
|
50
|
+
reEncryptData(args: ReEncryptDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReEncryptDataCommandOutput) => void): void;
|
|
51
|
+
/**
|
|
52
|
+
* @see {@link TranslatePinDataCommand}
|
|
53
|
+
*/
|
|
54
|
+
translatePinData(args: TranslatePinDataCommandInput, options?: __HttpHandlerOptions): Promise<TranslatePinDataCommandOutput>;
|
|
55
|
+
translatePinData(args: TranslatePinDataCommandInput, cb: (err: any, data?: TranslatePinDataCommandOutput) => void): void;
|
|
56
|
+
translatePinData(args: TranslatePinDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TranslatePinDataCommandOutput) => void): void;
|
|
57
|
+
/**
|
|
58
|
+
* @see {@link VerifyAuthRequestCryptogramCommand}
|
|
59
|
+
*/
|
|
60
|
+
verifyAuthRequestCryptogram(args: VerifyAuthRequestCryptogramCommandInput, options?: __HttpHandlerOptions): Promise<VerifyAuthRequestCryptogramCommandOutput>;
|
|
61
|
+
verifyAuthRequestCryptogram(args: VerifyAuthRequestCryptogramCommandInput, cb: (err: any, data?: VerifyAuthRequestCryptogramCommandOutput) => void): void;
|
|
62
|
+
verifyAuthRequestCryptogram(args: VerifyAuthRequestCryptogramCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyAuthRequestCryptogramCommandOutput) => void): void;
|
|
63
|
+
/**
|
|
64
|
+
* @see {@link VerifyCardValidationDataCommand}
|
|
65
|
+
*/
|
|
66
|
+
verifyCardValidationData(args: VerifyCardValidationDataCommandInput, options?: __HttpHandlerOptions): Promise<VerifyCardValidationDataCommandOutput>;
|
|
67
|
+
verifyCardValidationData(args: VerifyCardValidationDataCommandInput, cb: (err: any, data?: VerifyCardValidationDataCommandOutput) => void): void;
|
|
68
|
+
verifyCardValidationData(args: VerifyCardValidationDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyCardValidationDataCommandOutput) => void): void;
|
|
69
|
+
/**
|
|
70
|
+
* @see {@link VerifyMacCommand}
|
|
71
|
+
*/
|
|
72
|
+
verifyMac(args: VerifyMacCommandInput, options?: __HttpHandlerOptions): Promise<VerifyMacCommandOutput>;
|
|
73
|
+
verifyMac(args: VerifyMacCommandInput, cb: (err: any, data?: VerifyMacCommandOutput) => void): void;
|
|
74
|
+
verifyMac(args: VerifyMacCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyMacCommandOutput) => void): void;
|
|
75
|
+
/**
|
|
76
|
+
* @see {@link VerifyPinDataCommand}
|
|
77
|
+
*/
|
|
78
|
+
verifyPinData(args: VerifyPinDataCommandInput, options?: __HttpHandlerOptions): Promise<VerifyPinDataCommandOutput>;
|
|
79
|
+
verifyPinData(args: VerifyPinDataCommandInput, cb: (err: any, data?: VerifyPinDataCommandOutput) => void): void;
|
|
80
|
+
verifyPinData(args: VerifyPinDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyPinDataCommandOutput) => void): void;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @public
|
|
84
|
+
* <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>
|
|
85
|
+
* <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>
|
|
86
|
+
*/
|
|
87
|
+
export declare class PaymentCryptographyData extends PaymentCryptographyDataClient implements PaymentCryptographyData {
|
|
88
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { RegionInputConfig, RegionResolvedConfig } from "@aws-sdk/config-resolver";
|
|
2
|
+
import { EndpointInputConfig, EndpointResolvedConfig } from "@aws-sdk/middleware-endpoint";
|
|
3
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
4
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
|
|
5
|
+
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
6
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
7
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, ChecksumConstructor as __ChecksumConstructor, Credentials as __Credentials, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
|
+
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
10
|
+
import { Decoder as __Decoder, Encoder as __Encoder, Provider as __Provider, StreamCollector as __StreamCollector } from "@smithy/types";
|
|
11
|
+
import { DecryptDataCommandInput, DecryptDataCommandOutput } from "./commands/DecryptDataCommand";
|
|
12
|
+
import { EncryptDataCommandInput, EncryptDataCommandOutput } from "./commands/EncryptDataCommand";
|
|
13
|
+
import { GenerateCardValidationDataCommandInput, GenerateCardValidationDataCommandOutput } from "./commands/GenerateCardValidationDataCommand";
|
|
14
|
+
import { GenerateMacCommandInput, GenerateMacCommandOutput } from "./commands/GenerateMacCommand";
|
|
15
|
+
import { GeneratePinDataCommandInput, GeneratePinDataCommandOutput } from "./commands/GeneratePinDataCommand";
|
|
16
|
+
import { ReEncryptDataCommandInput, ReEncryptDataCommandOutput } from "./commands/ReEncryptDataCommand";
|
|
17
|
+
import { TranslatePinDataCommandInput, TranslatePinDataCommandOutput } from "./commands/TranslatePinDataCommand";
|
|
18
|
+
import { VerifyAuthRequestCryptogramCommandInput, VerifyAuthRequestCryptogramCommandOutput } from "./commands/VerifyAuthRequestCryptogramCommand";
|
|
19
|
+
import { VerifyCardValidationDataCommandInput, VerifyCardValidationDataCommandOutput } from "./commands/VerifyCardValidationDataCommand";
|
|
20
|
+
import { VerifyMacCommandInput, VerifyMacCommandOutput } from "./commands/VerifyMacCommand";
|
|
21
|
+
import { VerifyPinDataCommandInput, VerifyPinDataCommandOutput } from "./commands/VerifyPinDataCommand";
|
|
22
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
23
|
+
export { __Client };
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export type ServiceInputTypes = DecryptDataCommandInput | EncryptDataCommandInput | GenerateCardValidationDataCommandInput | GenerateMacCommandInput | GeneratePinDataCommandInput | ReEncryptDataCommandInput | TranslatePinDataCommandInput | VerifyAuthRequestCryptogramCommandInput | VerifyCardValidationDataCommandInput | VerifyMacCommandInput | VerifyPinDataCommandInput;
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export type ServiceOutputTypes = DecryptDataCommandOutput | EncryptDataCommandOutput | GenerateCardValidationDataCommandOutput | GenerateMacCommandOutput | GeneratePinDataCommandOutput | ReEncryptDataCommandOutput | TranslatePinDataCommandOutput | VerifyAuthRequestCryptogramCommandOutput | VerifyCardValidationDataCommandOutput | VerifyMacCommandOutput | VerifyPinDataCommandOutput;
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
36
|
+
/**
|
|
37
|
+
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
38
|
+
*/
|
|
39
|
+
requestHandler?: __HttpHandler;
|
|
40
|
+
/**
|
|
41
|
+
* A constructor for a class implementing the {@link @aws-sdk/types#ChecksumConstructor} interface
|
|
42
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
46
|
+
/**
|
|
47
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
urlParser?: __UrlParser;
|
|
51
|
+
/**
|
|
52
|
+
* A function that can calculate the length of a request body.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
56
|
+
/**
|
|
57
|
+
* A function that converts a stream into an array of bytes.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
streamCollector?: __StreamCollector;
|
|
61
|
+
/**
|
|
62
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
base64Decoder?: __Decoder;
|
|
66
|
+
/**
|
|
67
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
base64Encoder?: __Encoder;
|
|
71
|
+
/**
|
|
72
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
utf8Decoder?: __Decoder;
|
|
76
|
+
/**
|
|
77
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
utf8Encoder?: __Encoder;
|
|
81
|
+
/**
|
|
82
|
+
* The runtime environment.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
runtime?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Disable dyanamically changing the endpoint of the client based on the hostPrefix
|
|
88
|
+
* trait of an operation.
|
|
89
|
+
*/
|
|
90
|
+
disableHostPrefix?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Unique service identifier.
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
serviceId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
98
|
+
*/
|
|
99
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
100
|
+
/**
|
|
101
|
+
* Enables FIPS compatible endpoints.
|
|
102
|
+
*/
|
|
103
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* The AWS region to which this client will send requests
|
|
106
|
+
*/
|
|
107
|
+
region?: string | __Provider<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Default credentials provider; Not available in browser runtime.
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
113
|
+
/**
|
|
114
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
118
|
+
/**
|
|
119
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
120
|
+
*/
|
|
121
|
+
maxAttempts?: number | __Provider<number>;
|
|
122
|
+
/**
|
|
123
|
+
* Specifies which retry algorithm to use.
|
|
124
|
+
*/
|
|
125
|
+
retryMode?: string | __Provider<string>;
|
|
126
|
+
/**
|
|
127
|
+
* Optional logger for logging debug/info/warn/error.
|
|
128
|
+
*/
|
|
129
|
+
logger?: __Logger;
|
|
130
|
+
/**
|
|
131
|
+
* The {@link @aws-sdk/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
132
|
+
*/
|
|
133
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
export type PaymentCryptographyDataClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
|
|
139
|
+
/**
|
|
140
|
+
* @public
|
|
141
|
+
*
|
|
142
|
+
* The configuration interface of PaymentCryptographyDataClient class constructor that set the region, credentials and other options.
|
|
143
|
+
*/
|
|
144
|
+
export interface PaymentCryptographyDataClientConfig extends PaymentCryptographyDataClientConfigType {
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
|
+
export type PaymentCryptographyDataClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
|
|
150
|
+
/**
|
|
151
|
+
* @public
|
|
152
|
+
*
|
|
153
|
+
* The resolved configuration interface of PaymentCryptographyDataClient class. This is resolved and normalized from the {@link PaymentCryptographyDataClientConfig | constructor configuration interface}.
|
|
154
|
+
*/
|
|
155
|
+
export interface PaymentCryptographyDataClientResolvedConfig extends PaymentCryptographyDataClientResolvedConfigType {
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @public
|
|
159
|
+
* <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>
|
|
160
|
+
* <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>
|
|
161
|
+
*/
|
|
162
|
+
export declare class PaymentCryptographyDataClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, PaymentCryptographyDataClientResolvedConfig> {
|
|
163
|
+
/**
|
|
164
|
+
* The resolved configuration of PaymentCryptographyDataClient class. This is resolved and normalized from the {@link PaymentCryptographyDataClientConfig | constructor configuration interface}.
|
|
165
|
+
*/
|
|
166
|
+
readonly config: PaymentCryptographyDataClientResolvedConfig;
|
|
167
|
+
constructor(configuration: PaymentCryptographyDataClientConfig);
|
|
168
|
+
/**
|
|
169
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
170
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
171
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
172
|
+
*/
|
|
173
|
+
destroy(): void;
|
|
174
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { DecryptDataInput, DecryptDataOutput } from "../models/models_0";
|
|
5
|
+
import { PaymentCryptographyDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PaymentCryptographyDataClient";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link DecryptDataCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DecryptDataCommandInput extends DecryptDataInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DecryptDataCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DecryptDataCommandOutput extends DecryptDataOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Decrypts ciphertext data to plaintext using symmetric, asymmetric, or DUKPT data encryption key. 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>
|
|
27
|
+
* <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>
|
|
28
|
+
* <p>For symmetric and DUKPT decryption, Amazon Web Services Payment Cryptography supports <code>TDES</code> and <code>AES</code> algorithms. For asymmetric decryption, Amazon Web Services Payment Cryptography supports <code>RSA</code>. When you use DUKPT, for <code>TDES</code> algorithm, the ciphertext data length must be a multiple of 16 bytes. For <code>AES</code> algorithm, the ciphertext data length must be a multiple of 32 bytes.</p>
|
|
29
|
+
* <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>
|
|
30
|
+
* <p>
|
|
31
|
+
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.</p>
|
|
32
|
+
* <p>
|
|
33
|
+
* <b>Related operations:</b>
|
|
34
|
+
* </p>
|
|
35
|
+
* <ul>
|
|
36
|
+
* <li>
|
|
37
|
+
* <p>
|
|
38
|
+
* <a>EncryptData</a>
|
|
39
|
+
* </p>
|
|
40
|
+
* </li>
|
|
41
|
+
* <li>
|
|
42
|
+
* <p>
|
|
43
|
+
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetPublicKeyCertificate.html">GetPublicCertificate</a>
|
|
44
|
+
* </p>
|
|
45
|
+
* </li>
|
|
46
|
+
* <li>
|
|
47
|
+
* <p>
|
|
48
|
+
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
|
|
49
|
+
* </p>
|
|
50
|
+
* </li>
|
|
51
|
+
* </ul>
|
|
52
|
+
* @example
|
|
53
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
54
|
+
* ```javascript
|
|
55
|
+
* import { PaymentCryptographyDataClient, DecryptDataCommand } from "@aws-sdk/client-payment-cryptography-data"; // ES Modules import
|
|
56
|
+
* // const { PaymentCryptographyDataClient, DecryptDataCommand } = require("@aws-sdk/client-payment-cryptography-data"); // CommonJS import
|
|
57
|
+
* const client = new PaymentCryptographyDataClient(config);
|
|
58
|
+
* const input = { // DecryptDataInput
|
|
59
|
+
* KeyIdentifier: "STRING_VALUE", // required
|
|
60
|
+
* CipherText: "STRING_VALUE", // required
|
|
61
|
+
* DecryptionAttributes: { // EncryptionDecryptionAttributes Union: only one key present
|
|
62
|
+
* Symmetric: { // SymmetricEncryptionAttributes
|
|
63
|
+
* Mode: "STRING_VALUE", // required
|
|
64
|
+
* InitializationVector: "STRING_VALUE",
|
|
65
|
+
* PaddingType: "STRING_VALUE",
|
|
66
|
+
* },
|
|
67
|
+
* Asymmetric: { // AsymmetricEncryptionAttributes
|
|
68
|
+
* PaddingType: "STRING_VALUE",
|
|
69
|
+
* },
|
|
70
|
+
* Dukpt: { // DukptEncryptionAttributes
|
|
71
|
+
* KeySerialNumber: "STRING_VALUE", // required
|
|
72
|
+
* Mode: "STRING_VALUE",
|
|
73
|
+
* DukptKeyDerivationType: "STRING_VALUE",
|
|
74
|
+
* DukptKeyVariant: "STRING_VALUE",
|
|
75
|
+
* InitializationVector: "STRING_VALUE",
|
|
76
|
+
* },
|
|
77
|
+
* },
|
|
78
|
+
* };
|
|
79
|
+
* const command = new DecryptDataCommand(input);
|
|
80
|
+
* const response = await client.send(command);
|
|
81
|
+
* // { // DecryptDataOutput
|
|
82
|
+
* // KeyArn: "STRING_VALUE", // required
|
|
83
|
+
* // KeyCheckValue: "STRING_VALUE", // required
|
|
84
|
+
* // PlainText: "STRING_VALUE", // required
|
|
85
|
+
* // };
|
|
86
|
+
*
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @param DecryptDataCommandInput - {@link DecryptDataCommandInput}
|
|
90
|
+
* @returns {@link DecryptDataCommandOutput}
|
|
91
|
+
* @see {@link DecryptDataCommandInput} for command's `input` shape.
|
|
92
|
+
* @see {@link DecryptDataCommandOutput} for command's `response` shape.
|
|
93
|
+
* @see {@link PaymentCryptographyDataClientResolvedConfig | config} for PaymentCryptographyDataClient's `config` shape.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
96
|
+
* <p>You do not have sufficient access to perform this action.</p>
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link InternalServerException} (server fault)
|
|
99
|
+
* <p>The request processing has failed because of an unknown error, exception, or failure.</p>
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
102
|
+
* <p>The request was denied due to an invalid resource error.</p>
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
105
|
+
* <p>The request was denied due to request throttling.</p>
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link ValidationException} (client fault)
|
|
108
|
+
* <p>The request was denied due to an invalid request error.</p>
|
|
109
|
+
*
|
|
110
|
+
* @throws {@link PaymentCryptographyDataServiceException}
|
|
111
|
+
* <p>Base exception class for all service exceptions from PaymentCryptographyData service.</p>
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
export declare class DecryptDataCommand extends $Command<DecryptDataCommandInput, DecryptDataCommandOutput, PaymentCryptographyDataClientResolvedConfig> {
|
|
115
|
+
readonly input: DecryptDataCommandInput;
|
|
116
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
117
|
+
/**
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
constructor(input: DecryptDataCommandInput);
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PaymentCryptographyDataClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DecryptDataCommandInput, DecryptDataCommandOutput>;
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
private serialize;
|
|
129
|
+
/**
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
private deserialize;
|
|
133
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { EncryptDataInput, EncryptDataOutput } from "../models/models_0";
|
|
5
|
+
import { PaymentCryptographyDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PaymentCryptographyDataClient";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export { __MetadataBearer, $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link EncryptDataCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface EncryptDataCommandInput extends EncryptDataInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link EncryptDataCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface EncryptDataCommandOutput extends EncryptDataOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* <p>Encrypts plaintext data to ciphertext using symmetric, asymmetric, or DUKPT data encryption key. 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>
|
|
27
|
+
* <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>
|
|
28
|
+
* <p>for symmetric and DUKPT encryption, Amazon Web Services Payment Cryptography supports <code>TDES</code> and <code>AES</code> algorithms. For asymmetric encryption, Amazon Web Services Payment Cryptography supports <code>RSA</code>. To encrypt using DUKPT, you must already have a DUKPT 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>.</p>
|
|
29
|
+
* <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>
|
|
30
|
+
* <p>
|
|
31
|
+
* <b>Cross-account use</b>: This operation can't be used across different Amazon Web Services accounts.</p>
|
|
32
|
+
* <p>
|
|
33
|
+
* <b>Related operations:</b>
|
|
34
|
+
* </p>
|
|
35
|
+
* <ul>
|
|
36
|
+
* <li>
|
|
37
|
+
* <p>
|
|
38
|
+
* <a>DecryptData</a>
|
|
39
|
+
* </p>
|
|
40
|
+
* </li>
|
|
41
|
+
* <li>
|
|
42
|
+
* <p>
|
|
43
|
+
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetPublicKeyCertificate.html">GetPublicCertificate</a>
|
|
44
|
+
* </p>
|
|
45
|
+
* </li>
|
|
46
|
+
* <li>
|
|
47
|
+
* <p>
|
|
48
|
+
* <a href="https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ImportKey.html">ImportKey</a>
|
|
49
|
+
* </p>
|
|
50
|
+
* </li>
|
|
51
|
+
* <li>
|
|
52
|
+
* <p>
|
|
53
|
+
* <a>ReEncryptData</a>
|
|
54
|
+
* </p>
|
|
55
|
+
* </li>
|
|
56
|
+
* </ul>
|
|
57
|
+
* @example
|
|
58
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
59
|
+
* ```javascript
|
|
60
|
+
* import { PaymentCryptographyDataClient, EncryptDataCommand } from "@aws-sdk/client-payment-cryptography-data"; // ES Modules import
|
|
61
|
+
* // const { PaymentCryptographyDataClient, EncryptDataCommand } = require("@aws-sdk/client-payment-cryptography-data"); // CommonJS import
|
|
62
|
+
* const client = new PaymentCryptographyDataClient(config);
|
|
63
|
+
* const input = { // EncryptDataInput
|
|
64
|
+
* KeyIdentifier: "STRING_VALUE", // required
|
|
65
|
+
* PlainText: "STRING_VALUE", // required
|
|
66
|
+
* EncryptionAttributes: { // EncryptionDecryptionAttributes Union: only one key present
|
|
67
|
+
* Symmetric: { // SymmetricEncryptionAttributes
|
|
68
|
+
* Mode: "STRING_VALUE", // required
|
|
69
|
+
* InitializationVector: "STRING_VALUE",
|
|
70
|
+
* PaddingType: "STRING_VALUE",
|
|
71
|
+
* },
|
|
72
|
+
* Asymmetric: { // AsymmetricEncryptionAttributes
|
|
73
|
+
* PaddingType: "STRING_VALUE",
|
|
74
|
+
* },
|
|
75
|
+
* Dukpt: { // DukptEncryptionAttributes
|
|
76
|
+
* KeySerialNumber: "STRING_VALUE", // required
|
|
77
|
+
* Mode: "STRING_VALUE",
|
|
78
|
+
* DukptKeyDerivationType: "STRING_VALUE",
|
|
79
|
+
* DukptKeyVariant: "STRING_VALUE",
|
|
80
|
+
* InitializationVector: "STRING_VALUE",
|
|
81
|
+
* },
|
|
82
|
+
* },
|
|
83
|
+
* };
|
|
84
|
+
* const command = new EncryptDataCommand(input);
|
|
85
|
+
* const response = await client.send(command);
|
|
86
|
+
* // { // EncryptDataOutput
|
|
87
|
+
* // KeyArn: "STRING_VALUE", // required
|
|
88
|
+
* // KeyCheckValue: "STRING_VALUE", // required
|
|
89
|
+
* // CipherText: "STRING_VALUE", // required
|
|
90
|
+
* // };
|
|
91
|
+
*
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @param EncryptDataCommandInput - {@link EncryptDataCommandInput}
|
|
95
|
+
* @returns {@link EncryptDataCommandOutput}
|
|
96
|
+
* @see {@link EncryptDataCommandInput} for command's `input` shape.
|
|
97
|
+
* @see {@link EncryptDataCommandOutput} for command's `response` shape.
|
|
98
|
+
* @see {@link PaymentCryptographyDataClientResolvedConfig | config} for PaymentCryptographyDataClient's `config` shape.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
101
|
+
* <p>You do not have sufficient access to perform this action.</p>
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link InternalServerException} (server fault)
|
|
104
|
+
* <p>The request processing has failed because of an unknown error, exception, or failure.</p>
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
107
|
+
* <p>The request was denied due to an invalid resource error.</p>
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
110
|
+
* <p>The request was denied due to request throttling.</p>
|
|
111
|
+
*
|
|
112
|
+
* @throws {@link ValidationException} (client fault)
|
|
113
|
+
* <p>The request was denied due to an invalid request error.</p>
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link PaymentCryptographyDataServiceException}
|
|
116
|
+
* <p>Base exception class for all service exceptions from PaymentCryptographyData service.</p>
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
export declare class EncryptDataCommand extends $Command<EncryptDataCommandInput, EncryptDataCommandOutput, PaymentCryptographyDataClientResolvedConfig> {
|
|
120
|
+
readonly input: EncryptDataCommandInput;
|
|
121
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
122
|
+
/**
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
constructor(input: EncryptDataCommandInput);
|
|
126
|
+
/**
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PaymentCryptographyDataClientResolvedConfig, options?: __HttpHandlerOptions): Handler<EncryptDataCommandInput, EncryptDataCommandOutput>;
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
private serialize;
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
private deserialize;
|
|
138
|
+
}
|