@azure/keyvault-keys 4.3.0-beta.1 → 4.3.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/CHANGELOG.md +8 -6
- package/README.md +14 -16
- package/dist/index.js +32 -584
- package/dist/index.js.map +1 -1
- package/dist-esm/keyvault-keys/src/constants.js +1 -1
- package/dist-esm/keyvault-keys/src/constants.js.map +1 -1
- package/dist-esm/keyvault-keys/src/cryptographyClient.js +8 -9
- package/dist-esm/keyvault-keys/src/cryptographyClient.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/keyVaultClient.js +14 -242
- package/dist-esm/keyvault-keys/src/generated/keyVaultClient.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/keyVaultClientContext.js +7 -5
- package/dist-esm/keyvault-keys/src/generated/keyVaultClientContext.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/models/index.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/models/mappers.js +0 -278
- package/dist-esm/keyvault-keys/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/keyvault-keys/src/generated/models/parameters.js +1 -45
- package/dist-esm/keyvault-keys/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/keyvault-keys/src/index.js +2 -19
- package/dist-esm/keyvault-keys/src/index.js.map +1 -1
- package/dist-esm/keyvault-keys/src/keysModels.js +1 -19
- package/dist-esm/keyvault-keys/src/keysModels.js.map +1 -1
- package/package.json +7 -6
- package/types/keyvault-keys.d.ts +32 -51
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for
|
|
4
4
|
* license information.
|
|
5
5
|
*
|
|
6
|
-
* Azure KeyVault Keys SDK for JavaScript - 4.3.0
|
|
6
|
+
* Azure KeyVault Keys SDK for JavaScript - 4.3.0
|
|
7
7
|
*/
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
@@ -86,13 +86,6 @@ const KeyCreateParameters = {
|
|
|
86
86
|
type: {
|
|
87
87
|
name: "String"
|
|
88
88
|
}
|
|
89
|
-
},
|
|
90
|
-
releasePolicy: {
|
|
91
|
-
serializedName: "release_policy",
|
|
92
|
-
type: {
|
|
93
|
-
name: "Composite",
|
|
94
|
-
className: "KeyReleasePolicy"
|
|
95
|
-
}
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
}
|
|
@@ -137,27 +130,6 @@ const Attributes = {
|
|
|
137
130
|
}
|
|
138
131
|
}
|
|
139
132
|
};
|
|
140
|
-
const KeyReleasePolicy = {
|
|
141
|
-
type: {
|
|
142
|
-
name: "Composite",
|
|
143
|
-
className: "KeyReleasePolicy",
|
|
144
|
-
modelProperties: {
|
|
145
|
-
contentType: {
|
|
146
|
-
defaultValue: "application/json; charset=utf-8",
|
|
147
|
-
serializedName: "contentType",
|
|
148
|
-
type: {
|
|
149
|
-
name: "String"
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
data: {
|
|
153
|
-
serializedName: "data",
|
|
154
|
-
type: {
|
|
155
|
-
name: "Base64Url"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
133
|
const KeyBundle = {
|
|
162
134
|
type: {
|
|
163
135
|
name: "Composite",
|
|
@@ -190,13 +162,6 @@ const KeyBundle = {
|
|
|
190
162
|
type: {
|
|
191
163
|
name: "Boolean"
|
|
192
164
|
}
|
|
193
|
-
},
|
|
194
|
-
releasePolicy: {
|
|
195
|
-
serializedName: "release_policy",
|
|
196
|
-
type: {
|
|
197
|
-
name: "Composite",
|
|
198
|
-
className: "KeyReleasePolicy"
|
|
199
|
-
}
|
|
200
165
|
}
|
|
201
166
|
}
|
|
202
167
|
}
|
|
@@ -385,13 +350,6 @@ const KeyImportParameters = {
|
|
|
385
350
|
name: "Dictionary",
|
|
386
351
|
value: { type: { name: "String" } }
|
|
387
352
|
}
|
|
388
|
-
},
|
|
389
|
-
releasePolicy: {
|
|
390
|
-
serializedName: "release_policy",
|
|
391
|
-
type: {
|
|
392
|
-
name: "Composite",
|
|
393
|
-
className: "KeyReleasePolicy"
|
|
394
|
-
}
|
|
395
353
|
}
|
|
396
354
|
}
|
|
397
355
|
}
|
|
@@ -425,13 +383,6 @@ const KeyUpdateParameters = {
|
|
|
425
383
|
name: "Dictionary",
|
|
426
384
|
value: { type: { name: "String" } }
|
|
427
385
|
}
|
|
428
|
-
},
|
|
429
|
-
releasePolicy: {
|
|
430
|
-
serializedName: "release_policy",
|
|
431
|
-
type: {
|
|
432
|
-
name: "Composite",
|
|
433
|
-
className: "KeyReleasePolicy"
|
|
434
|
-
}
|
|
435
386
|
}
|
|
436
387
|
}
|
|
437
388
|
}
|
|
@@ -678,78 +629,6 @@ const KeyVerifyResult = {
|
|
|
678
629
|
}
|
|
679
630
|
}
|
|
680
631
|
};
|
|
681
|
-
const KeyExportParameters = {
|
|
682
|
-
type: {
|
|
683
|
-
name: "Composite",
|
|
684
|
-
className: "KeyExportParameters",
|
|
685
|
-
modelProperties: {
|
|
686
|
-
wrappingKey: {
|
|
687
|
-
serializedName: "wrappingKey",
|
|
688
|
-
type: {
|
|
689
|
-
name: "Composite",
|
|
690
|
-
className: "JsonWebKey"
|
|
691
|
-
}
|
|
692
|
-
},
|
|
693
|
-
wrappingKid: {
|
|
694
|
-
serializedName: "wrappingKid",
|
|
695
|
-
type: {
|
|
696
|
-
name: "String"
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
enc: {
|
|
700
|
-
serializedName: "enc",
|
|
701
|
-
type: {
|
|
702
|
-
name: "String"
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
const KeyReleaseParameters = {
|
|
709
|
-
type: {
|
|
710
|
-
name: "Composite",
|
|
711
|
-
className: "KeyReleaseParameters",
|
|
712
|
-
modelProperties: {
|
|
713
|
-
target: {
|
|
714
|
-
constraints: {
|
|
715
|
-
MinLength: 1
|
|
716
|
-
},
|
|
717
|
-
serializedName: "target",
|
|
718
|
-
required: true,
|
|
719
|
-
type: {
|
|
720
|
-
name: "String"
|
|
721
|
-
}
|
|
722
|
-
},
|
|
723
|
-
nonce: {
|
|
724
|
-
serializedName: "nonce",
|
|
725
|
-
type: {
|
|
726
|
-
name: "String"
|
|
727
|
-
}
|
|
728
|
-
},
|
|
729
|
-
enc: {
|
|
730
|
-
serializedName: "enc",
|
|
731
|
-
type: {
|
|
732
|
-
name: "String"
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
const KeyReleaseResult = {
|
|
739
|
-
type: {
|
|
740
|
-
name: "Composite",
|
|
741
|
-
className: "KeyReleaseResult",
|
|
742
|
-
modelProperties: {
|
|
743
|
-
value: {
|
|
744
|
-
serializedName: "value",
|
|
745
|
-
readOnly: true,
|
|
746
|
-
type: {
|
|
747
|
-
name: "String"
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
};
|
|
753
632
|
const DeletedKeyListResult = {
|
|
754
633
|
type: {
|
|
755
634
|
name: "Composite",
|
|
@@ -778,158 +657,6 @@ const DeletedKeyListResult = {
|
|
|
778
657
|
}
|
|
779
658
|
}
|
|
780
659
|
};
|
|
781
|
-
const KeyRotationPolicy = {
|
|
782
|
-
type: {
|
|
783
|
-
name: "Composite",
|
|
784
|
-
className: "KeyRotationPolicy",
|
|
785
|
-
modelProperties: {
|
|
786
|
-
id: {
|
|
787
|
-
serializedName: "id",
|
|
788
|
-
readOnly: true,
|
|
789
|
-
type: {
|
|
790
|
-
name: "String"
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
|
-
lifetimeActions: {
|
|
794
|
-
serializedName: "lifetimeActions",
|
|
795
|
-
type: {
|
|
796
|
-
name: "Sequence",
|
|
797
|
-
element: {
|
|
798
|
-
type: {
|
|
799
|
-
name: "Composite",
|
|
800
|
-
className: "LifetimeActions"
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
},
|
|
805
|
-
attributes: {
|
|
806
|
-
serializedName: "attributes",
|
|
807
|
-
type: {
|
|
808
|
-
name: "Composite",
|
|
809
|
-
className: "KeyRotationPolicyAttributes"
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
};
|
|
815
|
-
const LifetimeActions = {
|
|
816
|
-
type: {
|
|
817
|
-
name: "Composite",
|
|
818
|
-
className: "LifetimeActions",
|
|
819
|
-
modelProperties: {
|
|
820
|
-
trigger: {
|
|
821
|
-
serializedName: "trigger",
|
|
822
|
-
type: {
|
|
823
|
-
name: "Composite",
|
|
824
|
-
className: "LifetimeActionsTrigger"
|
|
825
|
-
}
|
|
826
|
-
},
|
|
827
|
-
action: {
|
|
828
|
-
serializedName: "action",
|
|
829
|
-
type: {
|
|
830
|
-
name: "Composite",
|
|
831
|
-
className: "LifetimeActionsType"
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
const LifetimeActionsTrigger = {
|
|
838
|
-
type: {
|
|
839
|
-
name: "Composite",
|
|
840
|
-
className: "LifetimeActionsTrigger",
|
|
841
|
-
modelProperties: {
|
|
842
|
-
timeAfterCreate: {
|
|
843
|
-
serializedName: "timeAfterCreate",
|
|
844
|
-
type: {
|
|
845
|
-
name: "String"
|
|
846
|
-
}
|
|
847
|
-
},
|
|
848
|
-
timeBeforeExpiry: {
|
|
849
|
-
serializedName: "timeBeforeExpiry",
|
|
850
|
-
type: {
|
|
851
|
-
name: "String"
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
const LifetimeActionsType = {
|
|
858
|
-
type: {
|
|
859
|
-
name: "Composite",
|
|
860
|
-
className: "LifetimeActionsType",
|
|
861
|
-
modelProperties: {
|
|
862
|
-
type: {
|
|
863
|
-
serializedName: "type",
|
|
864
|
-
type: {
|
|
865
|
-
name: "Enum",
|
|
866
|
-
allowedValues: ["rotate", "notify"]
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
const KeyRotationPolicyAttributes = {
|
|
873
|
-
type: {
|
|
874
|
-
name: "Composite",
|
|
875
|
-
className: "KeyRotationPolicyAttributes",
|
|
876
|
-
modelProperties: {
|
|
877
|
-
expiryTime: {
|
|
878
|
-
serializedName: "expiryTime",
|
|
879
|
-
type: {
|
|
880
|
-
name: "String"
|
|
881
|
-
}
|
|
882
|
-
},
|
|
883
|
-
created: {
|
|
884
|
-
serializedName: "created",
|
|
885
|
-
readOnly: true,
|
|
886
|
-
type: {
|
|
887
|
-
name: "UnixTime"
|
|
888
|
-
}
|
|
889
|
-
},
|
|
890
|
-
updated: {
|
|
891
|
-
serializedName: "updated",
|
|
892
|
-
readOnly: true,
|
|
893
|
-
type: {
|
|
894
|
-
name: "UnixTime"
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
const GetRandomBytesRequest = {
|
|
901
|
-
type: {
|
|
902
|
-
name: "Composite",
|
|
903
|
-
className: "GetRandomBytesRequest",
|
|
904
|
-
modelProperties: {
|
|
905
|
-
count: {
|
|
906
|
-
constraints: {
|
|
907
|
-
InclusiveMaximum: 128,
|
|
908
|
-
InclusiveMinimum: 1
|
|
909
|
-
},
|
|
910
|
-
serializedName: "count",
|
|
911
|
-
required: true,
|
|
912
|
-
type: {
|
|
913
|
-
name: "Number"
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
const RandomBytes = {
|
|
920
|
-
type: {
|
|
921
|
-
name: "Composite",
|
|
922
|
-
className: "RandomBytes",
|
|
923
|
-
modelProperties: {
|
|
924
|
-
value: {
|
|
925
|
-
serializedName: "value",
|
|
926
|
-
type: {
|
|
927
|
-
name: "Base64Url"
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
};
|
|
933
660
|
const KeyProperties = {
|
|
934
661
|
type: {
|
|
935
662
|
name: "Composite",
|
|
@@ -984,11 +711,6 @@ const KeyAttributes = {
|
|
|
984
711
|
type: {
|
|
985
712
|
name: "String"
|
|
986
713
|
}
|
|
987
|
-
}, exportable: {
|
|
988
|
-
serializedName: "exportable",
|
|
989
|
-
type: {
|
|
990
|
-
name: "Boolean"
|
|
991
|
-
}
|
|
992
714
|
} })
|
|
993
715
|
}
|
|
994
716
|
};
|
|
@@ -1045,7 +767,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
1045
767
|
__proto__: null,
|
|
1046
768
|
KeyCreateParameters: KeyCreateParameters,
|
|
1047
769
|
Attributes: Attributes,
|
|
1048
|
-
KeyReleasePolicy: KeyReleasePolicy,
|
|
1049
770
|
KeyBundle: KeyBundle,
|
|
1050
771
|
JsonWebKey: JsonWebKey,
|
|
1051
772
|
KeyVaultError: KeyVaultError,
|
|
@@ -1061,17 +782,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
1061
782
|
KeySignParameters: KeySignParameters,
|
|
1062
783
|
KeyVerifyParameters: KeyVerifyParameters,
|
|
1063
784
|
KeyVerifyResult: KeyVerifyResult,
|
|
1064
|
-
KeyExportParameters: KeyExportParameters,
|
|
1065
|
-
KeyReleaseParameters: KeyReleaseParameters,
|
|
1066
|
-
KeyReleaseResult: KeyReleaseResult,
|
|
1067
785
|
DeletedKeyListResult: DeletedKeyListResult,
|
|
1068
|
-
KeyRotationPolicy: KeyRotationPolicy,
|
|
1069
|
-
LifetimeActions: LifetimeActions,
|
|
1070
|
-
LifetimeActionsTrigger: LifetimeActionsTrigger,
|
|
1071
|
-
LifetimeActionsType: LifetimeActionsType,
|
|
1072
|
-
KeyRotationPolicyAttributes: KeyRotationPolicyAttributes,
|
|
1073
|
-
GetRandomBytesRequest: GetRandomBytesRequest,
|
|
1074
|
-
RandomBytes: RandomBytes,
|
|
1075
786
|
KeyProperties: KeyProperties,
|
|
1076
787
|
KeyAttributes: KeyAttributes,
|
|
1077
788
|
DeletedKeyBundle: DeletedKeyBundle,
|
|
@@ -1174,10 +885,6 @@ const maxresults = {
|
|
|
1174
885
|
}
|
|
1175
886
|
}
|
|
1176
887
|
};
|
|
1177
|
-
const keyRotationPolicy = {
|
|
1178
|
-
parameterPath: "keyRotationPolicy",
|
|
1179
|
-
mapper: KeyRotationPolicy
|
|
1180
|
-
};
|
|
1181
888
|
const nextLink = {
|
|
1182
889
|
parameterPath: "nextLink",
|
|
1183
890
|
mapper: {
|
|
@@ -1198,7 +905,8 @@ const nextLink = {
|
|
|
1198
905
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1199
906
|
*/
|
|
1200
907
|
const packageName = "@azure/keyvault-keys";
|
|
1201
|
-
const packageVersion = "4.3.0
|
|
908
|
+
const packageVersion = "4.3.0";
|
|
909
|
+
/** @hidden */
|
|
1202
910
|
class KeyVaultClientContext extends coreHttp.ServiceClient {
|
|
1203
911
|
/**
|
|
1204
912
|
* Initializes a new instance of the KeyVaultClientContext class.
|
|
@@ -1213,10 +921,11 @@ class KeyVaultClientContext extends coreHttp.ServiceClient {
|
|
|
1213
921
|
if (!options) {
|
|
1214
922
|
options = {};
|
|
1215
923
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
924
|
+
if (!options.userAgent) {
|
|
925
|
+
const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
|
|
926
|
+
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
|
927
|
+
}
|
|
928
|
+
super(undefined, options);
|
|
1220
929
|
this.requestContentType = "application/json; charset=utf-8";
|
|
1221
930
|
this.baseUri = options.endpoint || "{vaultBaseUrl}";
|
|
1222
931
|
// Parameter assignments
|
|
@@ -1231,6 +940,7 @@ class KeyVaultClientContext extends coreHttp.ServiceClient {
|
|
|
1231
940
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1232
941
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1233
942
|
*/
|
|
943
|
+
/** @hidden */
|
|
1234
944
|
class KeyVaultClient extends KeyVaultClientContext {
|
|
1235
945
|
/**
|
|
1236
946
|
* Initializes a new instance of the KeyVaultClient class.
|
|
@@ -1258,21 +968,6 @@ class KeyVaultClient extends KeyVaultClientContext {
|
|
|
1258
968
|
};
|
|
1259
969
|
return this.sendOperationRequest(operationArguments, createKeyOperationSpec);
|
|
1260
970
|
}
|
|
1261
|
-
/**
|
|
1262
|
-
* The operation will rotate the key based on the key policy. It requires the keys/rotate permission.
|
|
1263
|
-
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
1264
|
-
* @param keyName The name of key to be rotated. The system will generate a new version in the
|
|
1265
|
-
* specified key.
|
|
1266
|
-
* @param options The options parameters.
|
|
1267
|
-
*/
|
|
1268
|
-
rotateKey(vaultBaseUrl, keyName, options) {
|
|
1269
|
-
const operationArguments = {
|
|
1270
|
-
vaultBaseUrl,
|
|
1271
|
-
keyName,
|
|
1272
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
1273
|
-
};
|
|
1274
|
-
return this.sendOperationRequest(operationArguments, rotateKeyOperationSpec);
|
|
1275
|
-
}
|
|
1276
971
|
/**
|
|
1277
972
|
* The import key operation may be used to import any key type into an Azure Key Vault. If the named
|
|
1278
973
|
* key already exists, Azure Key Vault creates a new version of the key. This operation requires the
|
|
@@ -1568,42 +1263,6 @@ class KeyVaultClient extends KeyVaultClientContext {
|
|
|
1568
1263
|
};
|
|
1569
1264
|
return this.sendOperationRequest(operationArguments, unwrapKeyOperationSpec);
|
|
1570
1265
|
}
|
|
1571
|
-
/**
|
|
1572
|
-
* The export key operation is applicable to all key types. The target key must be marked exportable.
|
|
1573
|
-
* This operation requires the keys/export permission.
|
|
1574
|
-
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
1575
|
-
* @param keyName The name of the key to get.
|
|
1576
|
-
* @param keyVersion Adding the version parameter retrieves a specific version of a key.
|
|
1577
|
-
* @param options The options parameters.
|
|
1578
|
-
*/
|
|
1579
|
-
export(vaultBaseUrl, keyName, keyVersion, options) {
|
|
1580
|
-
const operationArguments = {
|
|
1581
|
-
vaultBaseUrl,
|
|
1582
|
-
keyName,
|
|
1583
|
-
keyVersion,
|
|
1584
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
1585
|
-
};
|
|
1586
|
-
return this.sendOperationRequest(operationArguments, exportOperationSpec);
|
|
1587
|
-
}
|
|
1588
|
-
/**
|
|
1589
|
-
* The release key operation is applicable to all key types. The target key must be marked exportable.
|
|
1590
|
-
* This operation requires the keys/release permission.
|
|
1591
|
-
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
1592
|
-
* @param keyName The name of the key to get.
|
|
1593
|
-
* @param keyVersion Adding the version parameter retrieves a specific version of a key.
|
|
1594
|
-
* @param target The attestation assertion for the target of the key release.
|
|
1595
|
-
* @param options The options parameters.
|
|
1596
|
-
*/
|
|
1597
|
-
release(vaultBaseUrl, keyName, keyVersion, target, options) {
|
|
1598
|
-
const operationArguments = {
|
|
1599
|
-
vaultBaseUrl,
|
|
1600
|
-
keyName,
|
|
1601
|
-
keyVersion,
|
|
1602
|
-
target,
|
|
1603
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
1604
|
-
};
|
|
1605
|
-
return this.sendOperationRequest(operationArguments, releaseOperationSpec);
|
|
1606
|
-
}
|
|
1607
1266
|
/**
|
|
1608
1267
|
* Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public
|
|
1609
1268
|
* part of a deleted key. This operation includes deletion-specific information. The Get Deleted Keys
|
|
@@ -1669,52 +1328,6 @@ class KeyVaultClient extends KeyVaultClientContext {
|
|
|
1669
1328
|
};
|
|
1670
1329
|
return this.sendOperationRequest(operationArguments, recoverDeletedKeyOperationSpec);
|
|
1671
1330
|
}
|
|
1672
|
-
/**
|
|
1673
|
-
* The GetKeyRotationPolicy operation returns the specified key policy resources in the specified key
|
|
1674
|
-
* vault. This operation requires the keys/get permission.
|
|
1675
|
-
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
1676
|
-
* @param keyName The name of the key in a given key vault.
|
|
1677
|
-
* @param options The options parameters.
|
|
1678
|
-
*/
|
|
1679
|
-
getKeyRotationPolicy(vaultBaseUrl, keyName, options) {
|
|
1680
|
-
const operationArguments = {
|
|
1681
|
-
vaultBaseUrl,
|
|
1682
|
-
keyName,
|
|
1683
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
1684
|
-
};
|
|
1685
|
-
return this.sendOperationRequest(operationArguments, getKeyRotationPolicyOperationSpec);
|
|
1686
|
-
}
|
|
1687
|
-
/**
|
|
1688
|
-
* Set specified members in the key policy. Leave others as undefined. This operation requires the
|
|
1689
|
-
* keys/update permission.
|
|
1690
|
-
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
1691
|
-
* @param keyName The name of the key in the given vault.
|
|
1692
|
-
* @param keyRotationPolicy The policy for the key.
|
|
1693
|
-
* @param options The options parameters.
|
|
1694
|
-
*/
|
|
1695
|
-
updateKeyRotationPolicy(vaultBaseUrl, keyName, keyRotationPolicy, options) {
|
|
1696
|
-
const operationArguments = {
|
|
1697
|
-
vaultBaseUrl,
|
|
1698
|
-
keyName,
|
|
1699
|
-
keyRotationPolicy,
|
|
1700
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
1701
|
-
};
|
|
1702
|
-
return this.sendOperationRequest(operationArguments, updateKeyRotationPolicyOperationSpec);
|
|
1703
|
-
}
|
|
1704
|
-
/**
|
|
1705
|
-
* Get the requested number of bytes containing random values from a managed HSM.
|
|
1706
|
-
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
1707
|
-
* @param count The requested number of random bytes.
|
|
1708
|
-
* @param options The options parameters.
|
|
1709
|
-
*/
|
|
1710
|
-
getRandomBytes(vaultBaseUrl, count, options) {
|
|
1711
|
-
const operationArguments = {
|
|
1712
|
-
vaultBaseUrl,
|
|
1713
|
-
count,
|
|
1714
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
1715
|
-
};
|
|
1716
|
-
return this.sendOperationRequest(operationArguments, getRandomBytesOperationSpec);
|
|
1717
|
-
}
|
|
1718
1331
|
/**
|
|
1719
1332
|
* GetKeyVersionsNext
|
|
1720
1333
|
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
|
|
@@ -1781,10 +1394,9 @@ const createKeyOperationSpec = {
|
|
|
1781
1394
|
keyOps: ["options", "keyOps"],
|
|
1782
1395
|
keyAttributes: ["options", "keyAttributes"],
|
|
1783
1396
|
tags: ["options", "tags"],
|
|
1784
|
-
curve: ["options", "curve"]
|
|
1785
|
-
releasePolicy: ["options", "releasePolicy"]
|
|
1397
|
+
curve: ["options", "curve"]
|
|
1786
1398
|
},
|
|
1787
|
-
mapper:
|
|
1399
|
+
mapper: KeyCreateParameters
|
|
1788
1400
|
},
|
|
1789
1401
|
queryParameters: [apiVersion],
|
|
1790
1402
|
urlParameters: [vaultBaseUrl, keyName],
|
|
@@ -1792,22 +1404,6 @@ const createKeyOperationSpec = {
|
|
|
1792
1404
|
mediaType: "json",
|
|
1793
1405
|
serializer
|
|
1794
1406
|
};
|
|
1795
|
-
const rotateKeyOperationSpec = {
|
|
1796
|
-
path: "/keys/{key-name}/rotate",
|
|
1797
|
-
httpMethod: "POST",
|
|
1798
|
-
responses: {
|
|
1799
|
-
200: {
|
|
1800
|
-
bodyMapper: KeyBundle
|
|
1801
|
-
},
|
|
1802
|
-
default: {
|
|
1803
|
-
bodyMapper: KeyVaultError
|
|
1804
|
-
}
|
|
1805
|
-
},
|
|
1806
|
-
queryParameters: [apiVersion],
|
|
1807
|
-
urlParameters: [vaultBaseUrl, keyName],
|
|
1808
|
-
headerParameters: [accept],
|
|
1809
|
-
serializer
|
|
1810
|
-
};
|
|
1811
1407
|
const importKeyOperationSpec = {
|
|
1812
1408
|
path: "/keys/{key-name}",
|
|
1813
1409
|
httpMethod: "PUT",
|
|
@@ -1824,10 +1420,9 @@ const importKeyOperationSpec = {
|
|
|
1824
1420
|
hsm: ["options", "hsm"],
|
|
1825
1421
|
key: ["key"],
|
|
1826
1422
|
keyAttributes: ["options", "keyAttributes"],
|
|
1827
|
-
tags: ["options", "tags"]
|
|
1828
|
-
releasePolicy: ["options", "releasePolicy"]
|
|
1423
|
+
tags: ["options", "tags"]
|
|
1829
1424
|
},
|
|
1830
|
-
mapper:
|
|
1425
|
+
mapper: KeyImportParameters
|
|
1831
1426
|
},
|
|
1832
1427
|
queryParameters: [apiVersion],
|
|
1833
1428
|
urlParameters: [vaultBaseUrl, keyName],
|
|
@@ -1866,10 +1461,9 @@ const updateKeyOperationSpec = {
|
|
|
1866
1461
|
parameterPath: {
|
|
1867
1462
|
keyOps: ["options", "keyOps"],
|
|
1868
1463
|
keyAttributes: ["options", "keyAttributes"],
|
|
1869
|
-
tags: ["options", "tags"]
|
|
1870
|
-
releasePolicy: ["options", "releasePolicy"]
|
|
1464
|
+
tags: ["options", "tags"]
|
|
1871
1465
|
},
|
|
1872
|
-
mapper:
|
|
1466
|
+
mapper: KeyUpdateParameters
|
|
1873
1467
|
},
|
|
1874
1468
|
queryParameters: [apiVersion],
|
|
1875
1469
|
urlParameters: [
|
|
@@ -1962,7 +1556,7 @@ const restoreKeyOperationSpec = {
|
|
|
1962
1556
|
},
|
|
1963
1557
|
requestBody: {
|
|
1964
1558
|
parameterPath: { keyBundleBackup: ["keyBundleBackup"] },
|
|
1965
|
-
mapper:
|
|
1559
|
+
mapper: KeyRestoreParameters
|
|
1966
1560
|
},
|
|
1967
1561
|
queryParameters: [apiVersion],
|
|
1968
1562
|
urlParameters: [vaultBaseUrl],
|
|
@@ -1989,7 +1583,7 @@ const encryptOperationSpec = {
|
|
|
1989
1583
|
additionalAuthenticatedData: ["options", "additionalAuthenticatedData"],
|
|
1990
1584
|
authenticationTag: ["options", "authenticationTag"]
|
|
1991
1585
|
},
|
|
1992
|
-
mapper:
|
|
1586
|
+
mapper: KeyOperationsParameters
|
|
1993
1587
|
},
|
|
1994
1588
|
queryParameters: [apiVersion],
|
|
1995
1589
|
urlParameters: [
|
|
@@ -2020,7 +1614,7 @@ const decryptOperationSpec = {
|
|
|
2020
1614
|
additionalAuthenticatedData: ["options", "additionalAuthenticatedData"],
|
|
2021
1615
|
authenticationTag: ["options", "authenticationTag"]
|
|
2022
1616
|
},
|
|
2023
|
-
mapper:
|
|
1617
|
+
mapper: KeyOperationsParameters
|
|
2024
1618
|
},
|
|
2025
1619
|
queryParameters: [apiVersion],
|
|
2026
1620
|
urlParameters: [
|
|
@@ -2045,7 +1639,7 @@ const signOperationSpec = {
|
|
|
2045
1639
|
},
|
|
2046
1640
|
requestBody: {
|
|
2047
1641
|
parameterPath: { algorithm: ["algorithm"], value: ["value"] },
|
|
2048
|
-
mapper:
|
|
1642
|
+
mapper: KeySignParameters
|
|
2049
1643
|
},
|
|
2050
1644
|
queryParameters: [apiVersion],
|
|
2051
1645
|
urlParameters: [
|
|
@@ -2074,7 +1668,7 @@ const verifyOperationSpec = {
|
|
|
2074
1668
|
digest: ["digest"],
|
|
2075
1669
|
signature: ["signature"]
|
|
2076
1670
|
},
|
|
2077
|
-
mapper:
|
|
1671
|
+
mapper: KeyVerifyParameters
|
|
2078
1672
|
},
|
|
2079
1673
|
queryParameters: [apiVersion],
|
|
2080
1674
|
urlParameters: [
|
|
@@ -2105,7 +1699,7 @@ const wrapKeyOperationSpec = {
|
|
|
2105
1699
|
additionalAuthenticatedData: ["options", "additionalAuthenticatedData"],
|
|
2106
1700
|
authenticationTag: ["options", "authenticationTag"]
|
|
2107
1701
|
},
|
|
2108
|
-
mapper:
|
|
1702
|
+
mapper: KeyOperationsParameters
|
|
2109
1703
|
},
|
|
2110
1704
|
queryParameters: [apiVersion],
|
|
2111
1705
|
urlParameters: [
|
|
@@ -2136,65 +1730,7 @@ const unwrapKeyOperationSpec = {
|
|
|
2136
1730
|
additionalAuthenticatedData: ["options", "additionalAuthenticatedData"],
|
|
2137
1731
|
authenticationTag: ["options", "authenticationTag"]
|
|
2138
1732
|
},
|
|
2139
|
-
mapper:
|
|
2140
|
-
},
|
|
2141
|
-
queryParameters: [apiVersion],
|
|
2142
|
-
urlParameters: [
|
|
2143
|
-
vaultBaseUrl,
|
|
2144
|
-
keyName1,
|
|
2145
|
-
keyVersion
|
|
2146
|
-
],
|
|
2147
|
-
headerParameters: [contentType, accept],
|
|
2148
|
-
mediaType: "json",
|
|
2149
|
-
serializer
|
|
2150
|
-
};
|
|
2151
|
-
const exportOperationSpec = {
|
|
2152
|
-
path: "/keys/{key-name}/{key-version}/export",
|
|
2153
|
-
httpMethod: "POST",
|
|
2154
|
-
responses: {
|
|
2155
|
-
200: {
|
|
2156
|
-
bodyMapper: KeyBundle
|
|
2157
|
-
},
|
|
2158
|
-
default: {
|
|
2159
|
-
bodyMapper: KeyVaultError
|
|
2160
|
-
}
|
|
2161
|
-
},
|
|
2162
|
-
requestBody: {
|
|
2163
|
-
parameterPath: {
|
|
2164
|
-
wrappingKey: ["options", "wrappingKey"],
|
|
2165
|
-
wrappingKid: ["options", "wrappingKid"],
|
|
2166
|
-
enc: ["options", "enc"]
|
|
2167
|
-
},
|
|
2168
|
-
mapper: Object.assign(Object.assign({}, KeyExportParameters), { required: true })
|
|
2169
|
-
},
|
|
2170
|
-
queryParameters: [apiVersion],
|
|
2171
|
-
urlParameters: [
|
|
2172
|
-
vaultBaseUrl,
|
|
2173
|
-
keyName1,
|
|
2174
|
-
keyVersion
|
|
2175
|
-
],
|
|
2176
|
-
headerParameters: [contentType, accept],
|
|
2177
|
-
mediaType: "json",
|
|
2178
|
-
serializer
|
|
2179
|
-
};
|
|
2180
|
-
const releaseOperationSpec = {
|
|
2181
|
-
path: "/keys/{key-name}/{key-version}/release",
|
|
2182
|
-
httpMethod: "POST",
|
|
2183
|
-
responses: {
|
|
2184
|
-
200: {
|
|
2185
|
-
bodyMapper: KeyReleaseResult
|
|
2186
|
-
},
|
|
2187
|
-
default: {
|
|
2188
|
-
bodyMapper: KeyVaultError
|
|
2189
|
-
}
|
|
2190
|
-
},
|
|
2191
|
-
requestBody: {
|
|
2192
|
-
parameterPath: {
|
|
2193
|
-
target: ["target"],
|
|
2194
|
-
nonce: ["options", "nonce"],
|
|
2195
|
-
enc: ["options", "enc"]
|
|
2196
|
-
},
|
|
2197
|
-
mapper: Object.assign(Object.assign({}, KeyReleaseParameters), { required: true })
|
|
1733
|
+
mapper: KeyOperationsParameters
|
|
2198
1734
|
},
|
|
2199
1735
|
queryParameters: [apiVersion],
|
|
2200
1736
|
urlParameters: [
|
|
@@ -2268,61 +1804,6 @@ const recoverDeletedKeyOperationSpec = {
|
|
|
2268
1804
|
headerParameters: [accept],
|
|
2269
1805
|
serializer
|
|
2270
1806
|
};
|
|
2271
|
-
const getKeyRotationPolicyOperationSpec = {
|
|
2272
|
-
path: "/keys/{key-name}/rotationpolicy",
|
|
2273
|
-
httpMethod: "GET",
|
|
2274
|
-
responses: {
|
|
2275
|
-
200: {
|
|
2276
|
-
bodyMapper: KeyRotationPolicy
|
|
2277
|
-
},
|
|
2278
|
-
default: {
|
|
2279
|
-
bodyMapper: KeyVaultError
|
|
2280
|
-
}
|
|
2281
|
-
},
|
|
2282
|
-
queryParameters: [apiVersion],
|
|
2283
|
-
urlParameters: [vaultBaseUrl, keyName1],
|
|
2284
|
-
headerParameters: [accept],
|
|
2285
|
-
serializer
|
|
2286
|
-
};
|
|
2287
|
-
const updateKeyRotationPolicyOperationSpec = {
|
|
2288
|
-
path: "/keys/{key-name}/rotationpolicy",
|
|
2289
|
-
httpMethod: "PUT",
|
|
2290
|
-
responses: {
|
|
2291
|
-
200: {
|
|
2292
|
-
bodyMapper: KeyRotationPolicy
|
|
2293
|
-
},
|
|
2294
|
-
default: {
|
|
2295
|
-
bodyMapper: KeyVaultError
|
|
2296
|
-
}
|
|
2297
|
-
},
|
|
2298
|
-
requestBody: keyRotationPolicy,
|
|
2299
|
-
queryParameters: [apiVersion],
|
|
2300
|
-
urlParameters: [vaultBaseUrl, keyName1],
|
|
2301
|
-
headerParameters: [contentType, accept],
|
|
2302
|
-
mediaType: "json",
|
|
2303
|
-
serializer
|
|
2304
|
-
};
|
|
2305
|
-
const getRandomBytesOperationSpec = {
|
|
2306
|
-
path: "/rng",
|
|
2307
|
-
httpMethod: "POST",
|
|
2308
|
-
responses: {
|
|
2309
|
-
200: {
|
|
2310
|
-
bodyMapper: RandomBytes
|
|
2311
|
-
},
|
|
2312
|
-
default: {
|
|
2313
|
-
bodyMapper: KeyVaultError
|
|
2314
|
-
}
|
|
2315
|
-
},
|
|
2316
|
-
requestBody: {
|
|
2317
|
-
parameterPath: { count: ["count"] },
|
|
2318
|
-
mapper: Object.assign(Object.assign({}, GetRandomBytesRequest), { required: true })
|
|
2319
|
-
},
|
|
2320
|
-
queryParameters: [apiVersion],
|
|
2321
|
-
urlParameters: [vaultBaseUrl],
|
|
2322
|
-
headerParameters: [contentType, accept],
|
|
2323
|
-
mediaType: "json",
|
|
2324
|
-
serializer
|
|
2325
|
-
};
|
|
2326
1807
|
const getKeyVersionsNextOperationSpec = {
|
|
2327
1808
|
path: "{nextLink}",
|
|
2328
1809
|
httpMethod: "GET",
|
|
@@ -2378,7 +1859,7 @@ const getDeletedKeysNextOperationSpec = {
|
|
|
2378
1859
|
|
|
2379
1860
|
// Copyright (c) Microsoft Corporation.
|
|
2380
1861
|
// Licensed under the MIT license.
|
|
2381
|
-
const SDK_VERSION = "4.3.0
|
|
1862
|
+
const SDK_VERSION = "4.3.0";
|
|
2382
1863
|
|
|
2383
1864
|
// Copyright (c) Microsoft Corporation.
|
|
2384
1865
|
/**
|
|
@@ -2970,23 +2451,7 @@ class RecoverDeletedKeyPoller extends KeyVaultKeyPoller {
|
|
|
2970
2451
|
/**
|
|
2971
2452
|
* The latest supported Key Vault service API version
|
|
2972
2453
|
*/
|
|
2973
|
-
const LATEST_API_VERSION = "7.
|
|
2974
|
-
(function (KnownKeyOperations) {
|
|
2975
|
-
/** Key operation - encrypt */
|
|
2976
|
-
KnownKeyOperations["Encrypt"] = "encrypt";
|
|
2977
|
-
/** Key operation - encrypt */
|
|
2978
|
-
KnownKeyOperations["Decrypt"] = "decrypt";
|
|
2979
|
-
/** Key operation - encrypt */
|
|
2980
|
-
KnownKeyOperations["Sign"] = "sign";
|
|
2981
|
-
/** Key operation - encrypt */
|
|
2982
|
-
KnownKeyOperations["Verify"] = "verify";
|
|
2983
|
-
/** Key operation - encrypt */
|
|
2984
|
-
KnownKeyOperations["WrapKey"] = "wrapKey";
|
|
2985
|
-
/** Key operation - encrypt */
|
|
2986
|
-
KnownKeyOperations["UnwrapKey"] = "unwrapKey";
|
|
2987
|
-
/** Key operation - encrypt */
|
|
2988
|
-
KnownKeyOperations["Import"] = "import";
|
|
2989
|
-
})(exports.KnownKeyOperations || (exports.KnownKeyOperations = {}));
|
|
2454
|
+
const LATEST_API_VERSION = "7.2";
|
|
2990
2455
|
|
|
2991
2456
|
// Copyright (c) Microsoft Corporation.
|
|
2992
2457
|
/**
|
|
@@ -3580,7 +3045,7 @@ class CryptographyClient {
|
|
|
3580
3045
|
encrypt(...args) {
|
|
3581
3046
|
const [parameters, options] = this.disambiguateEncryptArguments(args);
|
|
3582
3047
|
return withTrace$3("encrypt", options, async (updatedOptions) => {
|
|
3583
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3048
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "encrypt" /* Encrypt */);
|
|
3584
3049
|
this.initializeIV(parameters);
|
|
3585
3050
|
const provider = await this.getProvider("encrypt", parameters.algorithm, updatedOptions);
|
|
3586
3051
|
try {
|
|
@@ -3639,7 +3104,7 @@ class CryptographyClient {
|
|
|
3639
3104
|
decrypt(...args) {
|
|
3640
3105
|
const [parameters, options] = this.disambiguateDecryptArguments(args);
|
|
3641
3106
|
return withTrace$3("decrypt", options, async (updatedOptions) => {
|
|
3642
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3107
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "decrypt" /* Decrypt */);
|
|
3643
3108
|
const provider = await this.getProvider("decrypt", parameters.algorithm, updatedOptions);
|
|
3644
3109
|
try {
|
|
3645
3110
|
return provider.decrypt(parameters, updatedOptions);
|
|
@@ -3686,7 +3151,7 @@ class CryptographyClient {
|
|
|
3686
3151
|
*/
|
|
3687
3152
|
wrapKey(algorithm, key, options = {}) {
|
|
3688
3153
|
return withTrace$3("wrapKey", options, async (updatedOptions) => {
|
|
3689
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3154
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "wrapKey" /* WrapKey */);
|
|
3690
3155
|
const provider = await this.getProvider("wrapKey", algorithm, updatedOptions);
|
|
3691
3156
|
try {
|
|
3692
3157
|
return provider.wrapKey(algorithm, key, updatedOptions);
|
|
@@ -3713,7 +3178,7 @@ class CryptographyClient {
|
|
|
3713
3178
|
*/
|
|
3714
3179
|
unwrapKey(algorithm, encryptedKey, options = {}) {
|
|
3715
3180
|
return withTrace$3("unwrapKey", options, async (updatedOptions) => {
|
|
3716
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3181
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "unwrapKey" /* UnwrapKey */);
|
|
3717
3182
|
const provider = await this.getProvider("unwrapKey", algorithm, updatedOptions);
|
|
3718
3183
|
try {
|
|
3719
3184
|
return provider.unwrapKey(algorithm, encryptedKey, updatedOptions);
|
|
@@ -3740,7 +3205,7 @@ class CryptographyClient {
|
|
|
3740
3205
|
*/
|
|
3741
3206
|
sign(algorithm, digest, options = {}) {
|
|
3742
3207
|
return withTrace$3("sign", options, async (updatedOptions) => {
|
|
3743
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3208
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "sign" /* Sign */);
|
|
3744
3209
|
const provider = await this.getProvider("sign", algorithm, updatedOptions);
|
|
3745
3210
|
try {
|
|
3746
3211
|
return provider.sign(algorithm, digest, updatedOptions);
|
|
@@ -3768,7 +3233,7 @@ class CryptographyClient {
|
|
|
3768
3233
|
*/
|
|
3769
3234
|
verify(algorithm, digest, signature, options = {}) {
|
|
3770
3235
|
return withTrace$3("verify", options, async (updatedOptions) => {
|
|
3771
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3236
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "verify" /* Verify */);
|
|
3772
3237
|
const provider = await this.getProvider("verify", algorithm, updatedOptions);
|
|
3773
3238
|
try {
|
|
3774
3239
|
return provider.verify(algorithm, digest, signature, updatedOptions);
|
|
@@ -3795,7 +3260,7 @@ class CryptographyClient {
|
|
|
3795
3260
|
*/
|
|
3796
3261
|
signData(algorithm, data, options = {}) {
|
|
3797
3262
|
return withTrace$3("signData", options, async (updatedOptions) => {
|
|
3798
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3263
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "sign" /* Sign */);
|
|
3799
3264
|
const provider = await this.getProvider("signData", algorithm, updatedOptions);
|
|
3800
3265
|
try {
|
|
3801
3266
|
return provider.signData(algorithm, data, updatedOptions);
|
|
@@ -3823,7 +3288,7 @@ class CryptographyClient {
|
|
|
3823
3288
|
*/
|
|
3824
3289
|
verifyData(algorithm, data, signature, options = {}) {
|
|
3825
3290
|
return withTrace$3("verifyData", options, async (updatedOptions) => {
|
|
3826
|
-
this.ensureValid(await this.fetchKey(updatedOptions),
|
|
3291
|
+
this.ensureValid(await this.fetchKey(updatedOptions), "verify" /* Verify */);
|
|
3827
3292
|
const provider = await this.getProvider("verifyData", algorithm, updatedOptions);
|
|
3828
3293
|
try {
|
|
3829
3294
|
return provider.verifyData(algorithm, data, signature, updatedOptions);
|
|
@@ -4302,23 +3767,6 @@ class KeyClient {
|
|
|
4302
3767
|
return getKeyFromKeyBundle(response);
|
|
4303
3768
|
});
|
|
4304
3769
|
}
|
|
4305
|
-
/**
|
|
4306
|
-
* Gets the requested number of bytes containing random values from a managed HSM.
|
|
4307
|
-
*
|
|
4308
|
-
* Example usage:
|
|
4309
|
-
* ```ts
|
|
4310
|
-
* let client = new KeyClient(vaultUrl, credentials);
|
|
4311
|
-
* let bytes = await client.getRandomBytes(10);
|
|
4312
|
-
* ```
|
|
4313
|
-
* @param count - The number of bytes to generate between 1 and 128 inclusive.
|
|
4314
|
-
* @param options - The optional parameters.
|
|
4315
|
-
*/
|
|
4316
|
-
getRandomBytes(count, options = {}) {
|
|
4317
|
-
return withTrace$4("getRandomBytes", options, async (updatedOptions) => {
|
|
4318
|
-
const response = await this.client.getRandomBytes(this.vaultUrl, count, updatedOptions);
|
|
4319
|
-
return response.value;
|
|
4320
|
-
});
|
|
4321
|
-
}
|
|
4322
3770
|
/**
|
|
4323
3771
|
* @internal
|
|
4324
3772
|
* @hidden
|