你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
KeyVaultClientExtensions.VerifyAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
VerifyAsync(IKeyVaultClient, String, String, Byte[], Byte[], CancellationToken)
- Source:
- KeyVaultClientExtensions.cs
使用指定的密钥验证签名
public static System.Threading.Tasks.Task<bool> VerifyAsync(this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string keyIdentifier, string algorithm, byte[] digest, byte[] signature, System.Threading.CancellationToken cancellationToken = default);
static member VerifyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * byte[] * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function VerifyAsync (operations As IKeyVaultClient, keyIdentifier As String, algorithm As String, digest As Byte(), signature As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
参数
- operations
- IKeyVaultClient
- keyIdentifier
- String
用于签名的密钥的全局密钥标识符
- algorithm
- String
签名/验证算法。 有关可能的算法类型的详细信息,请参阅 JsonWebKeySignatureAlgorithm。
- digest
- Byte[]
用于签名的摘要
- signature
- Byte[]
要验证的签名
- cancellationToken
- CancellationToken
可选取消令牌
返回
如果签名已验证,则为 true;否则为 false。
适用于
VerifyAsync(IKeyVaultClient, String, String, String, String, Byte[], Byte[], CancellationToken)
- Source:
- KeyVaultClientExtensions.cs
使用指定的密钥验证签名。
public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyVerifyResult> VerifyAsync(this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, string keyName, string keyVersion, string algorithm, byte[] digest, byte[] signature, System.Threading.CancellationToken cancellationToken = default);
static member VerifyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * string * byte[] * byte[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyVerifyResult>
<Extension()>
Public Function VerifyAsync (operations As IKeyVaultClient, vaultBaseUrl As String, keyName As String, keyVersion As String, algorithm As String, digest As Byte(), signature As Byte(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyVerifyResult)
参数
- operations
- IKeyVaultClient
此扩展方法的操作组。
- 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[]
要验证的签名。
- cancellationToken
- CancellationToken
取消标记。
返回
注解
VERIFY 操作适用于存储在 Azure 密钥保管库 中的对称密钥。 不需要对 Azure 密钥保管库中存储的非对称密钥严格执行 VERIFY,因为可以使用密钥的公共部分执行签名验证。但是,支持此操作可为具有密钥引用,但无权访问公钥材料的调用方提供方便。 此操作需要密钥/验证权限。