@maxim_mazurok/gapi.client.cloudkms-v1 0.0.20230620 → 0.0.20230625
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/index.d.ts +352 -1
- package/package.json +1 -1
- package/tests.ts +27 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://cloudkms.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230625
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -858,6 +858,192 @@ declare namespace gapi.client {
|
|
|
858
858
|
protectionLevel?:
|
|
859
859
|
string;
|
|
860
860
|
}
|
|
861
|
+
interface RawDecryptRequest {
|
|
862
|
+
/** Optional. Optional data that must match the data originally supplied in RawEncryptRequest.additional_authenticated_data. */
|
|
863
|
+
additionalAuthenticatedData?:
|
|
864
|
+
string;
|
|
865
|
+
/**
|
|
866
|
+
* Optional. An optional CRC32C checksum of the RawDecryptRequest.additional_authenticated_data. If specified, KeyManagementService will verify the integrity of the received
|
|
867
|
+
* additional_authenticated_data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should
|
|
868
|
+
* verify that CRC32C(additional_authenticated_data) is equal to additional_authenticated_data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may
|
|
869
|
+
* indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a
|
|
870
|
+
* non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
|
|
871
|
+
*/
|
|
872
|
+
additionalAuthenticatedDataCrc32c?:
|
|
873
|
+
string;
|
|
874
|
+
/** Required. The encrypted data originally returned in RawEncryptResponse.ciphertext. */
|
|
875
|
+
ciphertext?:
|
|
876
|
+
string;
|
|
877
|
+
/**
|
|
878
|
+
* Optional. An optional CRC32C checksum of the RawDecryptRequest.ciphertext. If specified, KeyManagementService will verify the integrity of the received ciphertext using this
|
|
879
|
+
* checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(ciphertext) is equal
|
|
880
|
+
* to ciphertext_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is
|
|
881
|
+
* defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to
|
|
882
|
+
* uint32 in languages that support this type.
|
|
883
|
+
*/
|
|
884
|
+
ciphertextCrc32c?:
|
|
885
|
+
string;
|
|
886
|
+
/** Required. The initialization vector (IV) used during encryption, which must match the data originally provided in RawEncryptResponse.initialization_vector. */
|
|
887
|
+
initializationVector?:
|
|
888
|
+
string;
|
|
889
|
+
/**
|
|
890
|
+
* Optional. An optional CRC32C checksum of the RawDecryptRequest.initialization_vector. If specified, KeyManagementService will verify the integrity of the received
|
|
891
|
+
* initialization_vector using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify
|
|
892
|
+
* that CRC32C(initialization_vector) is equal to initialization_vector_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your
|
|
893
|
+
* computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will
|
|
894
|
+
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
|
|
895
|
+
*/
|
|
896
|
+
initializationVectorCrc32c?:
|
|
897
|
+
string;
|
|
898
|
+
/**
|
|
899
|
+
* The length of the authentication tag that is appended to the end of the ciphertext. If unspecified (0), the default value for the key's algorithm will be used (for AES-GCM, the
|
|
900
|
+
* default value is 16).
|
|
901
|
+
*/
|
|
902
|
+
tagLength?:
|
|
903
|
+
number;
|
|
904
|
+
}
|
|
905
|
+
interface RawDecryptResponse {
|
|
906
|
+
/** The decrypted data. */
|
|
907
|
+
plaintext?:
|
|
908
|
+
string;
|
|
909
|
+
/**
|
|
910
|
+
* Integrity verification field. A CRC32C checksum of the returned RawDecryptResponse.plaintext. An integrity check of plaintext can be performed by computing the CRC32C checksum of
|
|
911
|
+
* plaintext and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may
|
|
912
|
+
* indicate an issue in your computation of the CRC32C checksum. Note: receiving this response message indicates that KeyManagementService is able to successfully decrypt the
|
|
913
|
+
* ciphertext. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and
|
|
914
|
+
* can be safely downconverted to uint32 in languages that support this type.
|
|
915
|
+
*/
|
|
916
|
+
plaintextCrc32c?:
|
|
917
|
+
string;
|
|
918
|
+
/** The ProtectionLevel of the CryptoKeyVersion used in decryption. */
|
|
919
|
+
protectionLevel?:
|
|
920
|
+
string;
|
|
921
|
+
/**
|
|
922
|
+
* Integrity verification field. A flag indicating whether RawDecryptRequest.additional_authenticated_data_crc32c was received by KeyManagementService and used for the integrity
|
|
923
|
+
* verification of additional_authenticated_data. A false value of this field indicates either that // RawDecryptRequest.additional_authenticated_data_crc32c was left unset or that it
|
|
924
|
+
* was not delivered to KeyManagementService. If you've set RawDecryptRequest.additional_authenticated_data_crc32c but this field is still false, discard the response and perform a
|
|
925
|
+
* limited number of retries.
|
|
926
|
+
*/
|
|
927
|
+
verifiedAdditionalAuthenticatedDataCrc32c?:
|
|
928
|
+
boolean;
|
|
929
|
+
/**
|
|
930
|
+
* Integrity verification field. A flag indicating whether RawDecryptRequest.ciphertext_crc32c was received by KeyManagementService and used for the integrity verification of the
|
|
931
|
+
* ciphertext. A false value of this field indicates either that RawDecryptRequest.ciphertext_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set
|
|
932
|
+
* RawDecryptRequest.ciphertext_crc32c but this field is still false, discard the response and perform a limited number of retries.
|
|
933
|
+
*/
|
|
934
|
+
verifiedCiphertextCrc32c?:
|
|
935
|
+
boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Integrity verification field. A flag indicating whether RawDecryptRequest.initialization_vector_crc32c was received by KeyManagementService and used for the integrity verification
|
|
938
|
+
* of initialization_vector. A false value of this field indicates either that RawDecryptRequest.initialization_vector_crc32c was left unset or that it was not delivered to
|
|
939
|
+
* KeyManagementService. If you've set RawDecryptRequest.initialization_vector_crc32c but this field is still false, discard the response and perform a limited number of retries.
|
|
940
|
+
*/
|
|
941
|
+
verifiedInitializationVectorCrc32c?:
|
|
942
|
+
boolean;
|
|
943
|
+
}
|
|
944
|
+
interface RawEncryptRequest {
|
|
945
|
+
/**
|
|
946
|
+
* Optional. Optional data that, if specified, must also be provided during decryption through RawDecryptRequest.additional_authenticated_data. This field may only be used in
|
|
947
|
+
* conjunction with an algorithm that accepts additional authenticated data (for example, AES-GCM). The maximum size depends on the key version's protection_level. For SOFTWARE keys,
|
|
948
|
+
* the plaintext must be no larger than 64KiB. For HSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.
|
|
949
|
+
*/
|
|
950
|
+
additionalAuthenticatedData?:
|
|
951
|
+
string;
|
|
952
|
+
/**
|
|
953
|
+
* Optional. An optional CRC32C checksum of the RawEncryptRequest.additional_authenticated_data. If specified, KeyManagementService will verify the integrity of the received
|
|
954
|
+
* additional_authenticated_data using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should
|
|
955
|
+
* verify that CRC32C(additional_authenticated_data) is equal to additional_authenticated_data_crc32c, and if so, perform a limited number of retries. A persistent mismatch may
|
|
956
|
+
* indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a
|
|
957
|
+
* non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
|
|
958
|
+
*/
|
|
959
|
+
additionalAuthenticatedDataCrc32c?:
|
|
960
|
+
string;
|
|
961
|
+
/**
|
|
962
|
+
* Optional. A customer-supplied initialization vector that will be used for encryption. If it is not provided for AES-CBC and AES-CTR, one will be generated. It will be returned in
|
|
963
|
+
* RawEncryptResponse.initialization_vector.
|
|
964
|
+
*/
|
|
965
|
+
initializationVector?:
|
|
966
|
+
string;
|
|
967
|
+
/**
|
|
968
|
+
* Optional. An optional CRC32C checksum of the RawEncryptRequest.initialization_vector. If specified, KeyManagementService will verify the integrity of the received
|
|
969
|
+
* initialization_vector using this checksum. KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify
|
|
970
|
+
* that CRC32C(initialization_vector) is equal to initialization_vector_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your
|
|
971
|
+
* computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will
|
|
972
|
+
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
|
|
973
|
+
*/
|
|
974
|
+
initializationVectorCrc32c?:
|
|
975
|
+
string;
|
|
976
|
+
/**
|
|
977
|
+
* Required. The data to encrypt. Must be no larger than 64KiB. The maximum size depends on the key version's protection_level. For SOFTWARE keys, the plaintext must be no larger than
|
|
978
|
+
* 64KiB. For HSM keys, the combined length of the plaintext and additional_authenticated_data fields must be no larger than 8KiB.
|
|
979
|
+
*/
|
|
980
|
+
plaintext?:
|
|
981
|
+
string;
|
|
982
|
+
/**
|
|
983
|
+
* Optional. An optional CRC32C checksum of the RawEncryptRequest.plaintext. If specified, KeyManagementService will verify the integrity of the received plaintext using this checksum.
|
|
984
|
+
* KeyManagementService will report an error if the checksum verification fails. If you receive a checksum error, your client should verify that CRC32C(plaintext) is equal to
|
|
985
|
+
* plaintext_crc32c, and if so, perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined
|
|
986
|
+
* as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in
|
|
987
|
+
* languages that support this type.
|
|
988
|
+
*/
|
|
989
|
+
plaintextCrc32c?:
|
|
990
|
+
string;
|
|
991
|
+
}
|
|
992
|
+
interface RawEncryptResponse {
|
|
993
|
+
/** The encrypted data. In the case of AES-GCM, the authentication tag is the tag_length bytes at the end of this field. */
|
|
994
|
+
ciphertext?:
|
|
995
|
+
string;
|
|
996
|
+
/**
|
|
997
|
+
* Integrity verification field. A CRC32C checksum of the returned RawEncryptResponse.ciphertext. An integrity check of ciphertext can be performed by computing the CRC32C checksum of
|
|
998
|
+
* ciphertext and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may
|
|
999
|
+
* indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a
|
|
1000
|
+
* non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
|
|
1001
|
+
*/
|
|
1002
|
+
ciphertextCrc32c?:
|
|
1003
|
+
string;
|
|
1004
|
+
/** The initialization vector (IV) generated by the service during encryption. This value must be stored and provided in RawDecryptRequest.initialization_vector at decryption time. */
|
|
1005
|
+
initializationVector?:
|
|
1006
|
+
string;
|
|
1007
|
+
/**
|
|
1008
|
+
* Integrity verification field. A CRC32C checksum of the returned RawEncryptResponse.initialization_vector. An integrity check of initialization_vector can be performed by computing
|
|
1009
|
+
* the CRC32C checksum of initialization_vector and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of
|
|
1010
|
+
* retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different
|
|
1011
|
+
* languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.
|
|
1012
|
+
*/
|
|
1013
|
+
initializationVectorCrc32c?:
|
|
1014
|
+
string;
|
|
1015
|
+
/** The resource name of the CryptoKeyVersion used in encryption. Check this field to verify that the intended resource was used for encryption. */
|
|
1016
|
+
name?:
|
|
1017
|
+
string;
|
|
1018
|
+
/** The ProtectionLevel of the CryptoKeyVersion used in encryption. */
|
|
1019
|
+
protectionLevel?:
|
|
1020
|
+
string;
|
|
1021
|
+
/** The length of the authentication tag that is appended to the end of the ciphertext. */
|
|
1022
|
+
tagLength?:
|
|
1023
|
+
number;
|
|
1024
|
+
/**
|
|
1025
|
+
* Integrity verification field. A flag indicating whether RawEncryptRequest.additional_authenticated_data_crc32c was received by KeyManagementService and used for the integrity
|
|
1026
|
+
* verification of additional_authenticated_data. A false value of this field indicates either that // RawEncryptRequest.additional_authenticated_data_crc32c was left unset or that it
|
|
1027
|
+
* was not delivered to KeyManagementService. If you've set RawEncryptRequest.additional_authenticated_data_crc32c but this field is still false, discard the response and perform a
|
|
1028
|
+
* limited number of retries.
|
|
1029
|
+
*/
|
|
1030
|
+
verifiedAdditionalAuthenticatedDataCrc32c?:
|
|
1031
|
+
boolean;
|
|
1032
|
+
/**
|
|
1033
|
+
* Integrity verification field. A flag indicating whether RawEncryptRequest.initialization_vector_crc32c was received by KeyManagementService and used for the integrity verification
|
|
1034
|
+
* of initialization_vector. A false value of this field indicates either that RawEncryptRequest.initialization_vector_crc32c was left unset or that it was not delivered to
|
|
1035
|
+
* KeyManagementService. If you've set RawEncryptRequest.initialization_vector_crc32c but this field is still false, discard the response and perform a limited number of retries.
|
|
1036
|
+
*/
|
|
1037
|
+
verifiedInitializationVectorCrc32c?:
|
|
1038
|
+
boolean;
|
|
1039
|
+
/**
|
|
1040
|
+
* Integrity verification field. A flag indicating whether RawEncryptRequest.plaintext_crc32c was received by KeyManagementService and used for the integrity verification of the
|
|
1041
|
+
* plaintext. A false value of this field indicates either that RawEncryptRequest.plaintext_crc32c was left unset or that it was not delivered to KeyManagementService. If you've set
|
|
1042
|
+
* RawEncryptRequest.plaintext_crc32c but this field is still false, discard the response and perform a limited number of retries.
|
|
1043
|
+
*/
|
|
1044
|
+
verifiedPlaintextCrc32c?:
|
|
1045
|
+
boolean;
|
|
1046
|
+
}
|
|
861
1047
|
// tslint:disable-next-line:no-empty-interface
|
|
862
1048
|
interface RestoreCryptoKeyVersionRequest {
|
|
863
1049
|
}
|
|
@@ -2327,6 +2513,171 @@ declare namespace gapi.client {
|
|
|
2327
2513
|
string;
|
|
2328
2514
|
},
|
|
2329
2515
|
body: CryptoKeyVersion): Request<CryptoKeyVersion>;
|
|
2516
|
+
/** Decrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. */
|
|
2517
|
+
rawDecrypt(request: {
|
|
2518
|
+
/** V1 error format. */
|
|
2519
|
+
"$.xgafv"?:
|
|
2520
|
+
string;
|
|
2521
|
+
/** OAuth access token. */
|
|
2522
|
+
access_token?:
|
|
2523
|
+
string;
|
|
2524
|
+
/** Data format for response. */
|
|
2525
|
+
alt?:
|
|
2526
|
+
string;
|
|
2527
|
+
/** JSONP */
|
|
2528
|
+
callback?:
|
|
2529
|
+
string;
|
|
2530
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2531
|
+
fields?:
|
|
2532
|
+
string;
|
|
2533
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2534
|
+
key?:
|
|
2535
|
+
string;
|
|
2536
|
+
/** Required. The resource name of the CryptoKeyVersion to use for decryption. */
|
|
2537
|
+
name:
|
|
2538
|
+
string;
|
|
2539
|
+
/** OAuth 2.0 token for the current user. */
|
|
2540
|
+
oauth_token?:
|
|
2541
|
+
string;
|
|
2542
|
+
/** Returns response with indentations and line breaks. */
|
|
2543
|
+
prettyPrint?:
|
|
2544
|
+
boolean;
|
|
2545
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2546
|
+
quotaUser?:
|
|
2547
|
+
string;
|
|
2548
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2549
|
+
upload_protocol?:
|
|
2550
|
+
string;
|
|
2551
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2552
|
+
uploadType?:
|
|
2553
|
+
string;
|
|
2554
|
+
/** Request body */
|
|
2555
|
+
resource:
|
|
2556
|
+
RawDecryptRequest;
|
|
2557
|
+
}): Request<RawDecryptResponse>;
|
|
2558
|
+
rawDecrypt(request: {
|
|
2559
|
+
/** V1 error format. */
|
|
2560
|
+
"$.xgafv"?:
|
|
2561
|
+
string;
|
|
2562
|
+
/** OAuth access token. */
|
|
2563
|
+
access_token?:
|
|
2564
|
+
string;
|
|
2565
|
+
/** Data format for response. */
|
|
2566
|
+
alt?:
|
|
2567
|
+
string;
|
|
2568
|
+
/** JSONP */
|
|
2569
|
+
callback?:
|
|
2570
|
+
string;
|
|
2571
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2572
|
+
fields?:
|
|
2573
|
+
string;
|
|
2574
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2575
|
+
key?:
|
|
2576
|
+
string;
|
|
2577
|
+
/** Required. The resource name of the CryptoKeyVersion to use for decryption. */
|
|
2578
|
+
name:
|
|
2579
|
+
string;
|
|
2580
|
+
/** OAuth 2.0 token for the current user. */
|
|
2581
|
+
oauth_token?:
|
|
2582
|
+
string;
|
|
2583
|
+
/** Returns response with indentations and line breaks. */
|
|
2584
|
+
prettyPrint?:
|
|
2585
|
+
boolean;
|
|
2586
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2587
|
+
quotaUser?:
|
|
2588
|
+
string;
|
|
2589
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2590
|
+
upload_protocol?:
|
|
2591
|
+
string;
|
|
2592
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2593
|
+
uploadType?:
|
|
2594
|
+
string;
|
|
2595
|
+
},
|
|
2596
|
+
body: RawDecryptRequest): Request<RawDecryptResponse>;
|
|
2597
|
+
/**
|
|
2598
|
+
* Encrypts data using portable cryptographic primitives. Most users should choose Encrypt and Decrypt rather than their raw counterparts. The CryptoKey.purpose must be
|
|
2599
|
+
* RAW_ENCRYPT_DECRYPT.
|
|
2600
|
+
*/
|
|
2601
|
+
rawEncrypt(request: {
|
|
2602
|
+
/** V1 error format. */
|
|
2603
|
+
"$.xgafv"?:
|
|
2604
|
+
string;
|
|
2605
|
+
/** OAuth access token. */
|
|
2606
|
+
access_token?:
|
|
2607
|
+
string;
|
|
2608
|
+
/** Data format for response. */
|
|
2609
|
+
alt?:
|
|
2610
|
+
string;
|
|
2611
|
+
/** JSONP */
|
|
2612
|
+
callback?:
|
|
2613
|
+
string;
|
|
2614
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2615
|
+
fields?:
|
|
2616
|
+
string;
|
|
2617
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2618
|
+
key?:
|
|
2619
|
+
string;
|
|
2620
|
+
/** Required. The resource name of the CryptoKeyVersion to use for encryption. */
|
|
2621
|
+
name:
|
|
2622
|
+
string;
|
|
2623
|
+
/** OAuth 2.0 token for the current user. */
|
|
2624
|
+
oauth_token?:
|
|
2625
|
+
string;
|
|
2626
|
+
/** Returns response with indentations and line breaks. */
|
|
2627
|
+
prettyPrint?:
|
|
2628
|
+
boolean;
|
|
2629
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2630
|
+
quotaUser?:
|
|
2631
|
+
string;
|
|
2632
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2633
|
+
upload_protocol?:
|
|
2634
|
+
string;
|
|
2635
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2636
|
+
uploadType?:
|
|
2637
|
+
string;
|
|
2638
|
+
/** Request body */
|
|
2639
|
+
resource:
|
|
2640
|
+
RawEncryptRequest;
|
|
2641
|
+
}): Request<RawEncryptResponse>;
|
|
2642
|
+
rawEncrypt(request: {
|
|
2643
|
+
/** V1 error format. */
|
|
2644
|
+
"$.xgafv"?:
|
|
2645
|
+
string;
|
|
2646
|
+
/** OAuth access token. */
|
|
2647
|
+
access_token?:
|
|
2648
|
+
string;
|
|
2649
|
+
/** Data format for response. */
|
|
2650
|
+
alt?:
|
|
2651
|
+
string;
|
|
2652
|
+
/** JSONP */
|
|
2653
|
+
callback?:
|
|
2654
|
+
string;
|
|
2655
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2656
|
+
fields?:
|
|
2657
|
+
string;
|
|
2658
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2659
|
+
key?:
|
|
2660
|
+
string;
|
|
2661
|
+
/** Required. The resource name of the CryptoKeyVersion to use for encryption. */
|
|
2662
|
+
name:
|
|
2663
|
+
string;
|
|
2664
|
+
/** OAuth 2.0 token for the current user. */
|
|
2665
|
+
oauth_token?:
|
|
2666
|
+
string;
|
|
2667
|
+
/** Returns response with indentations and line breaks. */
|
|
2668
|
+
prettyPrint?:
|
|
2669
|
+
boolean;
|
|
2670
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
2671
|
+
quotaUser?:
|
|
2672
|
+
string;
|
|
2673
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2674
|
+
upload_protocol?:
|
|
2675
|
+
string;
|
|
2676
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2677
|
+
uploadType?:
|
|
2678
|
+
string;
|
|
2679
|
+
},
|
|
2680
|
+
body: RawEncryptRequest): Request<RawEncryptResponse>;
|
|
2330
2681
|
/** Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared. */
|
|
2331
2682
|
restore(request: {
|
|
2332
2683
|
/** V1 error format. */
|
package/package.json
CHANGED
package/tests.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
4
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
5
|
|
|
6
|
-
// Revision:
|
|
6
|
+
// Revision: 20230625
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -683,6 +683,32 @@ gapi.load('client', async () => {
|
|
|
683
683
|
reimportEligible: true,
|
|
684
684
|
state: "Test string",
|
|
685
685
|
});
|
|
686
|
+
/** Decrypts data that was originally encrypted using a raw cryptographic mechanism. The CryptoKey.purpose must be RAW_ENCRYPT_DECRYPT. */
|
|
687
|
+
await gapi.client.cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.rawDecrypt({
|
|
688
|
+
name: "Test string",
|
|
689
|
+
}, {
|
|
690
|
+
additionalAuthenticatedData: "Test string",
|
|
691
|
+
additionalAuthenticatedDataCrc32c: "Test string",
|
|
692
|
+
ciphertext: "Test string",
|
|
693
|
+
ciphertextCrc32c: "Test string",
|
|
694
|
+
initializationVector: "Test string",
|
|
695
|
+
initializationVectorCrc32c: "Test string",
|
|
696
|
+
tagLength: 42,
|
|
697
|
+
});
|
|
698
|
+
/**
|
|
699
|
+
* Encrypts data using portable cryptographic primitives. Most users should choose Encrypt and Decrypt rather than their raw counterparts. The CryptoKey.purpose must be
|
|
700
|
+
* RAW_ENCRYPT_DECRYPT.
|
|
701
|
+
*/
|
|
702
|
+
await gapi.client.cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.rawEncrypt({
|
|
703
|
+
name: "Test string",
|
|
704
|
+
}, {
|
|
705
|
+
additionalAuthenticatedData: "Test string",
|
|
706
|
+
additionalAuthenticatedDataCrc32c: "Test string",
|
|
707
|
+
initializationVector: "Test string",
|
|
708
|
+
initializationVectorCrc32c: "Test string",
|
|
709
|
+
plaintext: "Test string",
|
|
710
|
+
plaintextCrc32c: "Test string",
|
|
711
|
+
});
|
|
686
712
|
/** Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state. Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time will be cleared. */
|
|
687
713
|
await gapi.client.cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore({
|
|
688
714
|
name: "Test string",
|