You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Copyright (c) Microsoft Corporation. All rights reserved.
2
+
// Licensed under the MIT License.
3
+
4
+
usingSystem;
5
+
usingAzure.Core;
6
+
7
+
namespaceAzure.Security.KeyVault.Keys
8
+
{
9
+
/// <summary>
10
+
/// The properties needed to create an AES key using the <see cref="KeyClient"/>.
11
+
/// </summary>
12
+
publicclassCreateOctKeyOptions:CreateKeyOptions
13
+
{
14
+
/// <summary>
15
+
/// Gets the name of the key to create.
16
+
/// </summary>
17
+
publicstringName{get;}
18
+
19
+
/// <summary>
20
+
/// Gets the key type of the <see cref="JsonWebKey"/> to create, including <see cref="KeyType.Oct"/> and <see cref="KeyType.OctHsm"/>.
21
+
/// </summary>
22
+
publicKeyTypeKeyType{get;}
23
+
24
+
/// <summary>
25
+
/// Gets or sets the key size in bits, such as 128, 192, or 256. If null, the service default is used.
26
+
/// </summary>
27
+
publicint?KeySize{get;set;}
28
+
29
+
/// <summary>
30
+
/// Gets a value indicating whether to create a hardware-protected key in a hardware security module (HSM).
31
+
/// </summary>
32
+
/// <value><c>true</c> to create a hardware-protected key; otherwise, <c>false</c> to create a software key.</value>
33
+
publicboolHardwareProtected{get;}
34
+
35
+
/// <summary>
36
+
/// Initializes a new instance of the <see cref="CreateOctKeyOptions"/> class.
37
+
/// </summary>
38
+
/// <param name="name">The name of the key to create.</param>
39
+
/// <param name="hardwareProtected">True to create a hardware-protected key in a hardware security module (HSM). The default is false to create a software key.</param>
40
+
/// <exception cref="ArgumentException"><paramref name="name"/> is empty.</exception>
41
+
/// <exception cref="ArgumentNullException"><paramref name="name"/> is null.</exception>
/// Creates and stores a new Elliptic Curve key in Key Vault. If the named key already exists,
147
-
/// Azure Key Vault creates a new version of the key. It requires the keys/create permission.
147
+
/// Azure Key Vault creates a new version of the key. This operation requires the keys/create permission.
148
148
/// </summary>
149
149
/// <param name="ecKeyOptions">The key options object containing information about the Elliptic Curve key being created.</param>
150
150
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
@@ -173,7 +173,7 @@ public virtual Response<KeyVaultKey> CreateEcKey(CreateEcKeyOptions ecKeyOptions
173
173
174
174
/// <summary>
175
175
/// Creates and stores a new Elliptic Curve key in Key Vault. If the named key already exists,
176
-
/// Azure Key Vault creates a new version of the key. It requires the keys/create permission.
176
+
/// Azure Key Vault creates a new version of the key. This operation requires the keys/create permission.
177
177
/// </summary>
178
178
/// <param name="ecKeyOptions">The key options object containing information about the Elliptic Curve key being created.</param>
179
179
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
@@ -202,7 +202,7 @@ public virtual async Task<Response<KeyVaultKey>> CreateEcKeyAsync(CreateEcKeyOpt
202
202
203
203
/// <summary>
204
204
/// Creates and stores a new RSA key in Key Vault. If the named key already exists, Azure Key Vault creates a new
205
-
/// version of the key. It requires the keys/create permission.
205
+
/// version of the key. This operation requires the keys/create permission.
206
206
/// </summary>
207
207
/// <param name="rsaKeyOptions">The key options object containing information about the RSA key being created.</param>
208
208
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
@@ -231,7 +231,7 @@ public virtual Response<KeyVaultKey> CreateRsaKey(CreateRsaKeyOptions rsaKeyOpti
231
231
232
232
/// <summary>
233
233
/// Creates and stores a new RSA key in Key Vault. If the named key already exists, Azure Key Vault creates a new
234
-
/// version of the key. It requires the keys/create permission.
234
+
/// version of the key. This operation requires the keys/create permission.
235
235
/// </summary>
236
236
/// <param name="rsaKeyOptions">The key options object containing information about the RSA key being created.</param>
237
237
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
@@ -258,6 +258,64 @@ public virtual async Task<Response<KeyVaultKey>> CreateRsaKeyAsync(CreateRsaKeyO
258
258
}
259
259
}
260
260
261
+
/// <summary>
262
+
/// Creates and stores a new AES key in Key Vault. If the named key already exists, Azure Key Vault creates a new
263
+
/// version of the key. This operation requires the keys/create permission.
264
+
/// </summary>
265
+
/// <param name="octKeyOptions">The key options object containing information about the AES key being created.</param>
266
+
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
267
+
/// <exception cref="ArgumentNullException"><paramref name="octKeyOptions"/> is null.</exception>
268
+
/// <exception cref="RequestFailedException">The server returned an error. See <see cref="Exception.Message"/> for details returned from the server.</exception>
/// Creates and stores a new AES key in Key Vault. If the named key already exists, Azure Key Vault creates a new
292
+
/// version of the key. This operation requires the keys/create permission.
293
+
/// </summary>
294
+
/// <param name="octKeyOptions">The key options object containing information about the AES key being created.</param>
295
+
/// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param>
296
+
/// <exception cref="ArgumentNullException"><paramref name="octKeyOptions"/> is null.</exception>
297
+
/// <exception cref="RequestFailedException">The server returned an error. See <see cref="Exception.Message"/> for details returned from the server.</exception>
0 commit comments