tencentcloud-sdk-nodejs-kms 4.0.1051 → 4.1.19

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.
@@ -1,675 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /*
3
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
- import {
20
- UpdateAliasRequest,
21
- EnableWhiteBoxKeyRequest,
22
- AsymmetricRsaDecryptRequest,
23
- EnableKeyRotationRequest,
24
- DescribeWhiteBoxKeyDetailsResponse,
25
- CreateKeyRequest,
26
- DisableWhiteBoxKeyResponse,
27
- DisableKeyResponse,
28
- DescribeWhiteBoxServiceStatusRequest,
29
- VerifyByAsymmetricKeyRequest,
30
- DescribeKeyRequest,
31
- WhiteboxKeyInfo,
32
- ListAlgorithmsResponse,
33
- DisableKeysResponse,
34
- DescribeWhiteBoxKeyResponse,
35
- UpdateKeyDescriptionResponse,
36
- DescribeWhiteBoxServiceStatusResponse,
37
- ImportKeyMaterialRequest,
38
- EnableKeyRequest,
39
- GetKeyRotationStatusRequest,
40
- ListAlgorithmsRequest,
41
- Tag,
42
- ListKeyDetailResponse,
43
- GenerateDataKeyRequest,
44
- UpdateAliasResponse,
45
- ScheduleKeyDeletionResponse,
46
- PostQuantumCryptoVerifyRequest,
47
- GenerateRandomResponse,
48
- DescribeKeysRequest,
49
- GetPublicKeyRequest,
50
- GetServiceStatusRequest,
51
- EnableWhiteBoxKeysResponse,
52
- ArchiveKeyResponse,
53
- VerifyByAsymmetricKeyResponse,
54
- DescribeWhiteBoxKeyRequest,
55
- GetParametersForImportResponse,
56
- DecryptResponse,
57
- CreateWhiteBoxKeyResponse,
58
- Key,
59
- DeleteImportedKeyMaterialResponse,
60
- EnableKeysRequest,
61
- EnableWhiteBoxKeysRequest,
62
- EncryptByWhiteBoxResponse,
63
- DescribeKeysResponse,
64
- EnableWhiteBoxKeyResponse,
65
- ReEncryptRequest,
66
- ListKeysResponse,
67
- AsymmetricSm2DecryptResponse,
68
- DisableKeyRotationResponse,
69
- DisableWhiteBoxKeysRequest,
70
- ListKeyDetailRequest,
71
- DeleteWhiteBoxKeyRequest,
72
- AlgorithmInfo,
73
- GetRegionsResponse,
74
- GenerateDataKeyResponse,
75
- CreateWhiteBoxKeyRequest,
76
- OverwriteWhiteBoxDeviceFingerprintsResponse,
77
- DisableWhiteBoxKeysResponse,
78
- ArchiveKeyRequest,
79
- GetParametersForImportRequest,
80
- CreateKeyResponse,
81
- ReEncryptResponse,
82
- EncryptResponse,
83
- CancelKeyDeletionRequest,
84
- DeleteImportedKeyMaterialRequest,
85
- EnableKeyResponse,
86
- GetServiceStatusResponse,
87
- DeviceFingerprint,
88
- GetKeyRotationStatusResponse,
89
- EncryptRequest,
90
- AsymmetricSm2DecryptRequest,
91
- DeleteWhiteBoxKeyResponse,
92
- ListKeysRequest,
93
- DescribeWhiteBoxDecryptKeyRequest,
94
- KeyMetadata,
95
- CancelKeyArchiveResponse,
96
- DecryptRequest,
97
- DescribeWhiteBoxKeyDetailsRequest,
98
- PostQuantumCryptoSignRequest,
99
- PostQuantumCryptoDecryptRequest,
100
- AsymmetricRsaDecryptResponse,
101
- CancelKeyDeletionResponse,
102
- DisableKeysRequest,
103
- DisableWhiteBoxKeyRequest,
104
- UnbindCloudResourceRequest,
105
- OverwriteWhiteBoxDeviceFingerprintsRequest,
106
- EnableKeyRotationResponse,
107
- BindCloudResourceResponse,
108
- EnableKeysResponse,
109
- SignByAsymmetricKeyRequest,
110
- DescribeWhiteBoxDeviceFingerprintsRequest,
111
- GetRegionsRequest,
112
- PostQuantumCryptoEncryptResponse,
113
- EncryptByWhiteBoxRequest,
114
- GenerateRandomRequest,
115
- ScheduleKeyDeletionRequest,
116
- PostQuantumCryptoEncryptRequest,
117
- DisableKeyRequest,
118
- ImportKeyMaterialResponse,
119
- GetPublicKeyResponse,
120
- BindCloudResourceRequest,
121
- TagFilter,
122
- PostQuantumCryptoSignResponse,
123
- SignByAsymmetricKeyResponse,
124
- PostQuantumCryptoVerifyResponse,
125
- DescribeWhiteBoxDecryptKeyResponse,
126
- DescribeWhiteBoxDeviceFingerprintsResponse,
127
- PostQuantumCryptoDecryptResponse,
128
- UpdateKeyDescriptionRequest,
129
- UnbindCloudResourceResponse,
130
- DescribeKeyResponse,
131
- CancelKeyArchiveRequest,
132
- DisableKeyRotationRequest,
133
- } from "./kms_models"
134
-
135
- /**
136
- * kms client
137
- * @class
138
- */
139
- export class Client extends TencentCloudCommon.AbstractClient {
140
- constructor(clientConfig: TencentCloudCommon.ClientConfig) {
141
- super("kms.tencentcloudapi.com", "2019-01-18", clientConfig)
142
- }
143
-
144
- /**
145
- * 使用后量子密码算法密钥对签名进行验证。
146
- */
147
- async PostQuantumCryptoVerify(
148
- req: PostQuantumCryptoVerifyRequest,
149
- cb?: (error: string, rep: PostQuantumCryptoVerifyResponse) => void
150
- ): Promise<PostQuantumCryptoVerifyResponse> {
151
- return this.request("PostQuantumCryptoVerify", req, cb)
152
- }
153
-
154
- /**
155
- * 本接口用于加密最多为4KB任意数据,可用于加密数据库密码,RSA Key,或其它较小的敏感信息。对于应用的数据加密,使用GenerateDataKey生成的DataKey进行本地数据的加解密操作
156
- */
157
- async Encrypt(
158
- req: EncryptRequest,
159
- cb?: (error: string, rep: EncryptResponse) => void
160
- ): Promise<EncryptResponse> {
161
- return this.request("Encrypt", req, cb)
162
- }
163
-
164
- /**
165
- * 本接口用于解密密文,得到明文数据。
166
- */
167
- async Decrypt(
168
- req: DecryptRequest,
169
- cb?: (error: string, rep: DecryptResponse) => void
170
- ): Promise<DecryptResponse> {
171
- return this.request("Decrypt", req, cb)
172
- }
173
-
174
- /**
175
- * 用于修改CMK的别名。对于处于PendingDelete状态的CMK禁止修改。
176
- */
177
- async UpdateAlias(
178
- req: UpdateAliasRequest,
179
- cb?: (error: string, rep: UpdateAliasResponse) => void
180
- ): Promise<UpdateAliasResponse> {
181
- return this.request("UpdateAlias", req, cb)
182
- }
183
-
184
- /**
185
- * 删除白盒密钥, 注意:必须先禁用后,才可以删除。
186
- */
187
- async DeleteWhiteBoxKey(
188
- req: DeleteWhiteBoxKeyRequest,
189
- cb?: (error: string, rep: DeleteWhiteBoxKeyResponse) => void
190
- ): Promise<DeleteWhiteBoxKeyResponse> {
191
- return this.request("DeleteWhiteBoxKey", req, cb)
192
- }
193
-
194
- /**
195
- * 用于导入密钥材料。只有类型为EXTERNAL 的CMK 才可以导入,导入的密钥材料使用 GetParametersForImport 获取的密钥进行加密。可以为指定的 CMK 重新导入密钥材料,并重新指定过期时间,但必须导入相同的密钥材料。CMK 密钥材料导入后不可以更换密钥材料。导入的密钥材料过期或者被删除后,指定的CMK将无法使用,需要再次导入相同的密钥材料才能正常使用。CMK是独立的,同样的密钥材料可导入不同的 CMK 中,但使用其中一个 CMK 加密的数据无法使用另一个 CMK解密。
196
- 只有Enabled 和 PendingImport状态的CMK可以导入密钥材料。
197
- */
198
- async ImportKeyMaterial(
199
- req: ImportKeyMaterialRequest,
200
- cb?: (error: string, rep: ImportKeyMaterialResponse) => void
201
- ): Promise<ImportKeyMaterialResponse> {
202
- return this.request("ImportKeyMaterial", req, cb)
203
- }
204
-
205
- /**
206
- * 该接口用于获取非对称密钥的公钥信息,可用于本地数据加密或验签。只有处于Enabled状态的非对称密钥才可能获取公钥。
207
- */
208
- async GetPublicKey(
209
- req: GetPublicKeyRequest,
210
- cb?: (error: string, rep: GetPublicKeyResponse) => void
211
- ): Promise<GetPublicKeyResponse> {
212
- return this.request("GetPublicKey", req, cb)
213
- }
214
-
215
- /**
216
- * 本接口用于禁用一个主密钥,处于禁用状态的Key无法用于加密、解密操作。
217
- */
218
- async DisableKey(
219
- req: DisableKeyRequest,
220
- cb?: (error: string, rep: DisableKeyResponse) => void
221
- ): Promise<DisableKeyResponse> {
222
- return this.request("DisableKey", req, cb)
223
- }
224
-
225
- /**
226
- * 本接口生成一个数据密钥,您可以用这个密钥进行本地数据的加密。
227
- */
228
- async GenerateDataKey(
229
- req: GenerateDataKeyRequest,
230
- cb?: (error: string, rep: GenerateDataKeyResponse) => void
231
- ): Promise<GenerateDataKeyResponse> {
232
- return this.request("GenerateDataKey", req, cb)
233
- }
234
-
235
- /**
236
- * 用于查询该用户是否已开通KMS服务
237
- */
238
- async GetServiceStatus(
239
- req?: GetServiceStatusRequest,
240
- cb?: (error: string, rep: GetServiceStatusResponse) => void
241
- ): Promise<GetServiceStatusResponse> {
242
- return this.request("GetServiceStatus", req, cb)
243
- }
244
-
245
- /**
246
- * 使用指定的SM2非对称密钥的私钥进行数据解密,密文必须是使用对应公钥加密的。处于Enabled 状态的非对称密钥才能进行解密操作。传入的密文的长度不能超过256字节。
247
- */
248
- async AsymmetricSm2Decrypt(
249
- req: AsymmetricSm2DecryptRequest,
250
- cb?: (error: string, rep: AsymmetricSm2DecryptResponse) => void
251
- ): Promise<AsymmetricSm2DecryptResponse> {
252
- return this.request("AsymmetricSm2Decrypt", req, cb)
253
- }
254
-
255
- /**
256
- * 非对称密钥签名。
257
- 注意:只有 KeyUsage 为 ASYMMETRIC_SIGN_VERIFY_SM2、ASYMMETRIC_SIGN_VERIFY_ECC 或其他支持的 ASYMMETRIC_SIGN_VERIFY_${ALGORITHM} 的密钥才可以使用签名功能。
258
- */
259
- async SignByAsymmetricKey(
260
- req: SignByAsymmetricKeyRequest,
261
- cb?: (error: string, rep: SignByAsymmetricKeyResponse) => void
262
- ): Promise<SignByAsymmetricKeyResponse> {
263
- return this.request("SignByAsymmetricKey", req, cb)
264
- }
265
-
266
- /**
267
- * 取消CMK的计划删除操作
268
- */
269
- async CancelKeyDeletion(
270
- req: CancelKeyDeletionRequest,
271
- cb?: (error: string, rep: CancelKeyDeletionResponse) => void
272
- ): Promise<CancelKeyDeletionResponse> {
273
- return this.request("CancelKeyDeletion", req, cb)
274
- }
275
-
276
- /**
277
- * 查询指定的CMK是否开启了密钥轮换功能。
278
- */
279
- async GetKeyRotationStatus(
280
- req: GetKeyRotationStatusRequest,
281
- cb?: (error: string, rep: GetKeyRotationStatusResponse) => void
282
- ): Promise<GetKeyRotationStatusResponse> {
283
- return this.request("GetKeyRotationStatus", req, cb)
284
- }
285
-
286
- /**
287
- * 获取白盒密钥列表
288
- */
289
- async DescribeWhiteBoxKeyDetails(
290
- req: DescribeWhiteBoxKeyDetailsRequest,
291
- cb?: (error: string, rep: DescribeWhiteBoxKeyDetailsResponse) => void
292
- ): Promise<DescribeWhiteBoxKeyDetailsResponse> {
293
- return this.request("DescribeWhiteBoxKeyDetails", req, cb)
294
- }
295
-
296
- /**
297
- * 记录当前key被哪个云产品的那个资源所使用。如果当前key设置了自动过期,则取消该设置,确保当前key不会自动失效。如果当前关联关系已经创建,也返回成功。
298
- */
299
- async BindCloudResource(
300
- req: BindCloudResourceRequest,
301
- cb?: (error: string, rep: BindCloudResourceResponse) => void
302
- ): Promise<BindCloudResourceResponse> {
303
- return this.request("BindCloudResource", req, cb)
304
- }
305
-
306
- /**
307
- * 对密钥进行归档,被归档的密钥只能用于解密,不能加密
308
- */
309
- async ArchiveKey(
310
- req: ArchiveKeyRequest,
311
- cb?: (error: string, rep: ArchiveKeyResponse) => void
312
- ): Promise<ArchiveKeyResponse> {
313
- return this.request("ArchiveKey", req, cb)
314
- }
315
-
316
- /**
317
- * 取消密钥归档,取消后密钥的状态变为Enabled。
318
- */
319
- async CancelKeyArchive(
320
- req: CancelKeyArchiveRequest,
321
- cb?: (error: string, rep: CancelKeyArchiveResponse) => void
322
- ): Promise<CancelKeyArchiveResponse> {
323
- return this.request("CancelKeyArchive", req, cb)
324
- }
325
-
326
- /**
327
- * 使用指定CMK对密文重新加密。
328
- */
329
- async ReEncrypt(
330
- req: ReEncryptRequest,
331
- cb?: (error: string, rep: ReEncryptResponse) => void
332
- ): Promise<ReEncryptResponse> {
333
- return this.request("ReEncrypt", req, cb)
334
- }
335
-
336
- /**
337
- * 批量启用白盒密钥
338
- */
339
- async EnableWhiteBoxKeys(
340
- req: EnableWhiteBoxKeysRequest,
341
- cb?: (error: string, rep: EnableWhiteBoxKeysResponse) => void
342
- ): Promise<EnableWhiteBoxKeysResponse> {
343
- return this.request("EnableWhiteBoxKeys", req, cb)
344
- }
345
-
346
- /**
347
- * 列出当前Region支持的加密方式
348
- */
349
- async ListAlgorithms(
350
- req?: ListAlgorithmsRequest,
351
- cb?: (error: string, rep: ListAlgorithmsResponse) => void
352
- ): Promise<ListAlgorithmsResponse> {
353
- return this.request("ListAlgorithms", req, cb)
354
- }
355
-
356
- /**
357
- * 用于获取指定KeyId的主密钥属性详情信息。
358
- */
359
- async DescribeKey(
360
- req: DescribeKeyRequest,
361
- cb?: (error: string, rep: DescribeKeyResponse) => void
362
- ): Promise<DescribeKeyResponse> {
363
- return this.request("DescribeKey", req, cb)
364
- }
365
-
366
- /**
367
- * 列出账号下面状态为Enabled, Disabled 和 PendingImport 的CMK KeyId 列表
368
- */
369
- async ListKeys(
370
- req: ListKeysRequest,
371
- cb?: (error: string, rep: ListKeysResponse) => void
372
- ): Promise<ListKeysResponse> {
373
- return this.request("ListKeys", req, cb)
374
- }
375
-
376
- /**
377
- * 随机数生成接口。
378
- */
379
- async GenerateRandom(
380
- req: GenerateRandomRequest,
381
- cb?: (error: string, rep: GenerateRandomResponse) => void
382
- ): Promise<GenerateRandomResponse> {
383
- return this.request("GenerateRandom", req, cb)
384
- }
385
-
386
- /**
387
- * 本接口使用后量子密码算法密钥,解密密文,并得到明文数据。
388
- */
389
- async PostQuantumCryptoDecrypt(
390
- req: PostQuantumCryptoDecryptRequest,
391
- cb?: (error: string, rep: PostQuantumCryptoDecryptResponse) => void
392
- ): Promise<PostQuantumCryptoDecryptResponse> {
393
- return this.request("PostQuantumCryptoDecrypt", req, cb)
394
- }
395
-
396
- /**
397
- * 覆盖指定密钥的设备指纹信息
398
- */
399
- async OverwriteWhiteBoxDeviceFingerprints(
400
- req: OverwriteWhiteBoxDeviceFingerprintsRequest,
401
- cb?: (error: string, rep: OverwriteWhiteBoxDeviceFingerprintsResponse) => void
402
- ): Promise<OverwriteWhiteBoxDeviceFingerprintsResponse> {
403
- return this.request("OverwriteWhiteBoxDeviceFingerprints", req, cb)
404
- }
405
-
406
- /**
407
- * 创建用户管理数据密钥的主密钥CMK(Custom Master Key)。
408
- */
409
- async CreateKey(
410
- req: CreateKeyRequest,
411
- cb?: (error: string, rep: CreateKeyResponse) => void
412
- ): Promise<CreateKeyResponse> {
413
- return this.request("CreateKey", req, cb)
414
- }
415
-
416
- /**
417
- * 展示白盒密钥的信息
418
- */
419
- async DescribeWhiteBoxKey(
420
- req: DescribeWhiteBoxKeyRequest,
421
- cb?: (error: string, rep: DescribeWhiteBoxKeyResponse) => void
422
- ): Promise<DescribeWhiteBoxKeyResponse> {
423
- return this.request("DescribeWhiteBoxKey", req, cb)
424
- }
425
-
426
- /**
427
- * 使用白盒密钥进行加密
428
- */
429
- async EncryptByWhiteBox(
430
- req: EncryptByWhiteBoxRequest,
431
- cb?: (error: string, rep: EncryptByWhiteBoxResponse) => void
432
- ): Promise<EncryptByWhiteBoxResponse> {
433
- return this.request("EncryptByWhiteBox", req, cb)
434
- }
435
-
436
- /**
437
- * 获取导入主密钥(CMK)材料的参数,返回的Token作为执行ImportKeyMaterial的参数之一,返回的PublicKey用于对自主导入密钥材料进行加密。返回的Token和PublicKey 24小时后失效,失效后如需重新导入,需要再次调用该接口获取新的Token和PublicKey。
438
- */
439
- async GetParametersForImport(
440
- req: GetParametersForImportRequest,
441
- cb?: (error: string, rep: GetParametersForImportResponse) => void
442
- ): Promise<GetParametersForImportResponse> {
443
- return this.request("GetParametersForImport", req, cb)
444
- }
445
-
446
- /**
447
- * 批量禁用白盒密钥
448
- */
449
- async DisableWhiteBoxKeys(
450
- req: DisableWhiteBoxKeysRequest,
451
- cb?: (error: string, rep: DisableWhiteBoxKeysResponse) => void
452
- ): Promise<DisableWhiteBoxKeysResponse> {
453
- return this.request("DisableWhiteBoxKeys", req, cb)
454
- }
455
-
456
- /**
457
- * 根据指定Offset和Limit获取主密钥列表详情。
458
- */
459
- async ListKeyDetail(
460
- req: ListKeyDetailRequest,
461
- cb?: (error: string, rep: ListKeyDetailResponse) => void
462
- ): Promise<ListKeyDetailResponse> {
463
- return this.request("ListKeyDetail", req, cb)
464
- }
465
-
466
- /**
467
- * 对指定的CMK禁止密钥轮换功能。
468
- */
469
- async DisableKeyRotation(
470
- req: DisableKeyRotationRequest,
471
- cb?: (error: string, rep: DisableKeyRotationResponse) => void
472
- ): Promise<DisableKeyRotationResponse> {
473
- return this.request("DisableKeyRotation", req, cb)
474
- }
475
-
476
- /**
477
- * 禁用白盒密钥
478
- */
479
- async DisableWhiteBoxKey(
480
- req: DisableWhiteBoxKeyRequest,
481
- cb?: (error: string, rep: DisableWhiteBoxKeyResponse) => void
482
- ): Promise<DisableWhiteBoxKeyResponse> {
483
- return this.request("DisableWhiteBoxKey", req, cb)
484
- }
485
-
486
- /**
487
- * 该接口用于批量启用CMK。
488
- */
489
- async EnableKeys(
490
- req: EnableKeysRequest,
491
- cb?: (error: string, rep: EnableKeysResponse) => void
492
- ): Promise<EnableKeysResponse> {
493
- return this.request("EnableKeys", req, cb)
494
- }
495
-
496
- /**
497
- * CMK计划删除接口,用于指定CMK删除的时间,可选时间区间为[7,30]天
498
- */
499
- async ScheduleKeyDeletion(
500
- req: ScheduleKeyDeletionRequest,
501
- cb?: (error: string, rep: ScheduleKeyDeletionResponse) => void
502
- ): Promise<ScheduleKeyDeletionResponse> {
503
- return this.request("ScheduleKeyDeletion", req, cb)
504
- }
505
-
506
- /**
507
- * 获取指定密钥的设备指纹列表
508
- */
509
- async DescribeWhiteBoxDeviceFingerprints(
510
- req: DescribeWhiteBoxDeviceFingerprintsRequest,
511
- cb?: (error: string, rep: DescribeWhiteBoxDeviceFingerprintsResponse) => void
512
- ): Promise<DescribeWhiteBoxDeviceFingerprintsResponse> {
513
- return this.request("DescribeWhiteBoxDeviceFingerprints", req, cb)
514
- }
515
-
516
- /**
517
- * 使用指定的RSA非对称密钥的私钥进行数据解密,密文必须是使用对应公钥加密的。处于Enabled 状态的非对称密钥才能进行解密操作。
518
- */
519
- async AsymmetricRsaDecrypt(
520
- req: AsymmetricRsaDecryptRequest,
521
- cb?: (error: string, rep: AsymmetricRsaDecryptResponse) => void
522
- ): Promise<AsymmetricRsaDecryptResponse> {
523
- return this.request("AsymmetricRsaDecrypt", req, cb)
524
- }
525
-
526
- /**
527
- * 删除指定(key, 资源,云产品)的记录,以表明:指定的云产品的资源已不再使用当前的key。
528
- */
529
- async UnbindCloudResource(
530
- req: UnbindCloudResourceRequest,
531
- cb?: (error: string, rep: UnbindCloudResourceResponse) => void
532
- ): Promise<UnbindCloudResourceResponse> {
533
- return this.request("UnbindCloudResource", req, cb)
534
- }
535
-
536
- /**
537
- * 对指定的CMK开启密钥轮换功能。
538
- */
539
- async EnableKeyRotation(
540
- req: EnableKeyRotationRequest,
541
- cb?: (error: string, rep: EnableKeyRotationResponse) => void
542
- ): Promise<EnableKeyRotationResponse> {
543
- return this.request("EnableKeyRotation", req, cb)
544
- }
545
-
546
- /**
547
- * 创建白盒密钥。 密钥个数的上限为 50。
548
- */
549
- async CreateWhiteBoxKey(
550
- req: CreateWhiteBoxKeyRequest,
551
- cb?: (error: string, rep: CreateWhiteBoxKeyResponse) => void
552
- ): Promise<CreateWhiteBoxKeyResponse> {
553
- return this.request("CreateWhiteBoxKey", req, cb)
554
- }
555
-
556
- /**
557
- * 本接口使用后量子密码算法密钥,可加密最多为4KB任意数据,可用于加密数据库密码,RSA Key,或其它较小的敏感信息。对于应用的数据加密,使用GenerateDataKey生成的DataKey进行本地数据的加解密操作。
558
- */
559
- async PostQuantumCryptoEncrypt(
560
- req: PostQuantumCryptoEncryptRequest,
561
- cb?: (error: string, rep: PostQuantumCryptoEncryptResponse) => void
562
- ): Promise<PostQuantumCryptoEncryptResponse> {
563
- return this.request("PostQuantumCryptoEncrypt", req, cb)
564
- }
565
-
566
- /**
567
- * 启用白盒密钥
568
- */
569
- async EnableWhiteBoxKey(
570
- req: EnableWhiteBoxKeyRequest,
571
- cb?: (error: string, rep: EnableWhiteBoxKeyResponse) => void
572
- ): Promise<EnableWhiteBoxKeyResponse> {
573
- return this.request("EnableWhiteBoxKey", req, cb)
574
- }
575
-
576
- /**
577
- * 用于启用一个指定的CMK。
578
- */
579
- async EnableKey(
580
- req: EnableKeyRequest,
581
- cb?: (error: string, rep: EnableKeyResponse) => void
582
- ): Promise<EnableKeyResponse> {
583
- return this.request("EnableKey", req, cb)
584
- }
585
-
586
- /**
587
- * 用于删除导入的密钥材料,仅对EXTERNAL类型的CMK有效,该接口将CMK设置为PendingImport 状态,并不会删除CMK,在重新进行密钥导入后可继续使用。彻底删除CMK请使用 ScheduleKeyDeletion 接口。
588
- */
589
- async DeleteImportedKeyMaterial(
590
- req: DeleteImportedKeyMaterialRequest,
591
- cb?: (error: string, rep: DeleteImportedKeyMaterialResponse) => void
592
- ): Promise<DeleteImportedKeyMaterialResponse> {
593
- return this.request("DeleteImportedKeyMaterial", req, cb)
594
- }
595
-
596
- /**
597
- * 该接口用于批量获取主密钥属性信息。
598
- */
599
- async DescribeKeys(
600
- req: DescribeKeysRequest,
601
- cb?: (error: string, rep: DescribeKeysResponse) => void
602
- ): Promise<DescribeKeysResponse> {
603
- return this.request("DescribeKeys", req, cb)
604
- }
605
-
606
- /**
607
- * 获取白盒密钥服务状态
608
- */
609
- async DescribeWhiteBoxServiceStatus(
610
- req?: DescribeWhiteBoxServiceStatusRequest,
611
- cb?: (error: string, rep: DescribeWhiteBoxServiceStatusResponse) => void
612
- ): Promise<DescribeWhiteBoxServiceStatusResponse> {
613
- return this.request("DescribeWhiteBoxServiceStatus", req, cb)
614
- }
615
-
616
- /**
617
- * 该接口用于对指定的cmk修改描述信息。对于处于PendingDelete状态的CMK禁止修改。
618
- */
619
- async UpdateKeyDescription(
620
- req: UpdateKeyDescriptionRequest,
621
- cb?: (error: string, rep: UpdateKeyDescriptionResponse) => void
622
- ): Promise<UpdateKeyDescriptionResponse> {
623
- return this.request("UpdateKeyDescription", req, cb)
624
- }
625
-
626
- /**
627
- * 该接口用于批量禁止CMK的使用。
628
- */
629
- async DisableKeys(
630
- req: DisableKeysRequest,
631
- cb?: (error: string, rep: DisableKeysResponse) => void
632
- ): Promise<DisableKeysResponse> {
633
- return this.request("DisableKeys", req, cb)
634
- }
635
-
636
- /**
637
- * 获取白盒解密密钥
638
- */
639
- async DescribeWhiteBoxDecryptKey(
640
- req: DescribeWhiteBoxDecryptKeyRequest,
641
- cb?: (error: string, rep: DescribeWhiteBoxDecryptKeyResponse) => void
642
- ): Promise<DescribeWhiteBoxDecryptKeyResponse> {
643
- return this.request("DescribeWhiteBoxDecryptKey", req, cb)
644
- }
645
-
646
- /**
647
- * 使用后量子密码算法签名验签密钥进行签名。
648
- */
649
- async PostQuantumCryptoSign(
650
- req: PostQuantumCryptoSignRequest,
651
- cb?: (error: string, rep: PostQuantumCryptoSignResponse) => void
652
- ): Promise<PostQuantumCryptoSignResponse> {
653
- return this.request("PostQuantumCryptoSign", req, cb)
654
- }
655
-
656
- /**
657
- * 获取可以提供KMS服务的地域列表
658
- */
659
- async GetRegions(
660
- req?: GetRegionsRequest,
661
- cb?: (error: string, rep: GetRegionsResponse) => void
662
- ): Promise<GetRegionsResponse> {
663
- return this.request("GetRegions", req, cb)
664
- }
665
-
666
- /**
667
- * 使用非对称密钥验签
668
- */
669
- async VerifyByAsymmetricKey(
670
- req: VerifyByAsymmetricKeyRequest,
671
- cb?: (error: string, rep: VerifyByAsymmetricKeyResponse) => void
672
- ): Promise<VerifyByAsymmetricKeyResponse> {
673
- return this.request("VerifyByAsymmetricKey", req, cb)
674
- }
675
- }