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

KeyVaultClient.VerifyWithHttpMessagesAsync 方法

定义

使用指定的密钥验证签名。

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyVerifyResult>> VerifyWithHttpMessagesAsync (string vaultBaseUrl, string keyName, string keyVersion, string algorithm, byte[] digest, byte[] signature, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyWithHttpMessagesAsync : string * string * string * string * byte[] * 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.KeyVerifyResult>>
override this.VerifyWithHttpMessagesAsync : string * string * string * string * byte[] * 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.KeyVerifyResult>>
Public Function VerifyWithHttpMessagesAsync (vaultBaseUrl As String, keyName As String, keyVersion As String, algorithm As String, digest As Byte(), signature As Byte(), Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of KeyVerifyResult))

参数

vaultBaseUrl
String

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

keyName
String

键的名称。

keyVersion
String

密钥的版本。

algorithm
String

签名/验证算法。 有关可能的算法类型的详细信息,请参阅 JsonWebKeySignatureAlgorithm。 可能的值包括:“PS256”、“PS384”、“PS512”、“RS256”、“RS384”、“RS512”、“RSNULL”、“ES256”、“ES384”、“ES512”、“ECDSA256”

digest
Byte[]

用于签名的摘要。

signature
Byte[]

要验证的签名。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

实现

例外

操作返回无效状态代码时引发

无法反序列化响应时引发

当所需的参数为 null 时引发

当所需的参数为 null 时引发

注解

VERIFY 操作适用于存储在 Azure 密钥保管库 中的对称密钥。 不需要对 Azure 密钥保管库中存储的非对称密钥严格执行 VERIFY,因为可以使用密钥的公共部分执行签名验证。但是,支持此操作可为具有密钥引用,但无权访问公钥材料的调用方提供方便。 此操作需要密钥/验证权限。

适用于