IKeyVaultClient.WrapKeyWithHttpMessagesAsync(String, String, String, String, Byte[], Dictionary<String,List<String>>, CancellationToken) Method

Definition

Wraps a symmetric key using a specified key.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyOperationResult>> WrapKeyWithHttpMessagesAsync (string vaultBaseUrl, string keyName, string keyVersion, string algorithm, byte[] value, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = null);
abstract member WrapKeyWithHttpMessagesAsync : string * string * string * string * byte[] * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyOperationResult>>

Parameters

vaultBaseUrl
String

The vault name, for example https://myvault.vault.azure.net.

keyName
String

The name of the key.

keyVersion
String

The version of the key.

algorithm
String

algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256', 'RSA1_5'

value
Byte[]
customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Task<Microsoft.Rest.Azure.AzureOperationResponse<KeyOperationResult>>

Remarks

The WRAP operation supports encryption of a symmetric key using a

key encryption key that has previously been stored in an Azure Key

Vault. The WRAP operation is only strictly necessary for symmetric

keys stored in Azure Key Vault since protection with an asymmetric

key can be performed using the public portion of the key. This

operation is supported for asymmetric keys as a convenience for

callers that have a key-reference but do not have access to the

public key material.

Applies to