你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IKeyVaultClient.WrapKeyWithHttpMessagesAsync 方法

定义

使用指定的密钥包装对称密钥。

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 = default, System.Threading.CancellationToken cancellationToken = default);
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>>
Public Function WrapKeyWithHttpMessagesAsync (vaultBaseUrl As String, keyName As String, keyVersion As String, algorithm As String, value As Byte(), Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of KeyOperationResult))

参数

vaultBaseUrl
String

保管库名称,例如 https://myvault.vault.azure.net

keyName
String

键的名称。

keyVersion
String

密钥的版本。

algorithm
String

算法标识符。 可能的值包括:“RSA-OAEP”、“RSA-OAEP-256”、“RSA1_5”

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

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

注解

WRAP 操作支持使用以前存储在 Azure 密钥保管库中的密钥加密密钥来加密对称密钥。 只需要对 Azure 密钥保管库中存储的对称密钥严格执行 WRAP 操作,因为可以使用密钥的公共部分执行非对称密钥保护。 非对称密钥支持此操作,这是为了给具有密钥引用,但无权访问公钥材料的调用方提供方便。 此操作需要 keys/wrapKey 权限。

适用于