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

CryptographyClient.VerifyDataAsync 方法

定义

重载

VerifyDataAsync(SignatureAlgorithm, Stream, Byte[], CancellationToken)

验证指定的签名。

VerifyDataAsync(SignatureAlgorithm, Byte[], Byte[], CancellationToken)

验证指定的签名。

VerifyDataAsync(SignatureAlgorithm, Stream, Byte[], CancellationToken)

验证指定的签名。

public virtual System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.VerifyResult> VerifyDataAsync (Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm algorithm, System.IO.Stream data, byte[] signature, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyDataAsync : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * System.IO.Stream * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.VerifyResult>
override this.VerifyDataAsync : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * System.IO.Stream * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.VerifyResult>
Public Overridable Function VerifyDataAsync (algorithm As SignatureAlgorithm, data As Stream, signature As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of VerifyResult)

参数

algorithm
SignatureAlgorithm

要使用的 SignatureAlgorithm。 这必须与用于对数据进行签名的算法相同。

data
Stream

与签名对应的数据。

signature
Byte[]

要验证的签名。

cancellationToken
CancellationToken

用于取消此操作的 CancellationToken

返回

验证操作的结果。 如果签名有效,则 IsValid 返回 VerifyResult 的 属性将设置为 true。

例外

指定的 algorithm 与密钥标识符对应的密钥不匹配。

data 为 null。

本地加密提供程序引发了异常。

键对于当前操作无效。

指定键不支持该操作。

服务器返回了错误。 有关从服务器返回的详细信息,请参阅 Message

注解

用于计算摘要的哈希算法派生自指定的算法:

适用于

VerifyDataAsync(SignatureAlgorithm, Byte[], Byte[], CancellationToken)

验证指定的签名。

public virtual System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.VerifyResult> VerifyDataAsync (Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm algorithm, byte[] data, byte[] signature, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyDataAsync : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * byte[] * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.VerifyResult>
override this.VerifyDataAsync : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * byte[] * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Keys.Cryptography.VerifyResult>
Public Overridable Function VerifyDataAsync (algorithm As SignatureAlgorithm, data As Byte(), signature As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of VerifyResult)

参数

algorithm
SignatureAlgorithm

要使用的 SignatureAlgorithm。 这必须与用于对数据进行签名的算法相同。

data
Byte[]

与签名对应的数据。

signature
Byte[]

要验证的签名。

cancellationToken
CancellationToken

用于取消此操作的 CancellationToken

返回

验证操作的结果。 如果签名有效,则 IsValid 返回 VerifyResult 的 属性将设置为 true。

例外

指定的 algorithm 与密钥标识符对应的密钥不匹配。

data 为 null。

本地加密提供程序引发了异常。

键对于当前操作无效。

指定键不支持该操作。

服务器返回了错误。 有关从服务器返回的详细信息,请参阅 Message

注解

用于计算摘要的哈希算法派生自指定的算法:

适用于