CryptographyClient.Verify Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Verify(MLDsaVerifyOptions, CancellationToken) |
Verifies a signature using a post-quantum ML-DSA (AKP) key. |
| Verify(SignatureAlgorithm, Byte[], Byte[], CancellationToken) |
Verifies the specified signature. |
Verify(MLDsaVerifyOptions, CancellationToken)
- Source:
- CryptographyClient.cs
Verifies a signature using a post-quantum ML-DSA (AKP) key.
public virtual Azure.Security.KeyVault.Keys.Cryptography.VerifyResult Verify(Azure.Security.KeyVault.Keys.Cryptography.MLDsaVerifyOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member Verify : Azure.Security.KeyVault.Keys.Cryptography.MLDsaVerifyOptions * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.VerifyResult
override this.Verify : Azure.Security.KeyVault.Keys.Cryptography.MLDsaVerifyOptions * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.VerifyResult
Public Overridable Function Verify (options As MLDsaVerifyOptions, Optional cancellationToken As CancellationToken = Nothing) As VerifyResult
Parameters
- options
- MLDsaVerifyOptions
The MLDsaVerifyOptions describing the signature to verify, the message or external mu, and any optional context.
- cancellationToken
- CancellationToken
A CancellationToken to cancel the operation.
Returns
The result of the verify operation. If the signature is valid the IsValid property of the returned VerifyResult will be set to true.
Exceptions
options is null.
The client was constructed with a local key and cannot perform this operation.
The server returned an error. See Message for details returned from the server.
Remarks
The algorithm is inferred from the key and is not specified by the caller. This operation is always performed by the vault and is not supported by local-only clients.
Applies to
Verify(SignatureAlgorithm, Byte[], Byte[], CancellationToken)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Verifies the specified signature.
public virtual Azure.Security.KeyVault.Keys.Cryptography.VerifyResult Verify(Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm algorithm, byte[] digest, byte[] signature, System.Threading.CancellationToken cancellationToken = default);
abstract member Verify : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * byte[] * byte[] * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.VerifyResult
override this.Verify : Azure.Security.KeyVault.Keys.Cryptography.SignatureAlgorithm * byte[] * byte[] * System.Threading.CancellationToken -> Azure.Security.KeyVault.Keys.Cryptography.VerifyResult
Public Overridable Function Verify (algorithm As SignatureAlgorithm, digest As Byte(), signature As Byte(), Optional cancellationToken As CancellationToken = Nothing) As VerifyResult
Parameters
- algorithm
- SignatureAlgorithm
The SignatureAlgorithm to use. This must be the same algorithm used to sign the digest.
- digest
- Byte[]
The pre-hashed digest corresponding to the signature. The hash algorithm used to compute the digest must be compatible with the specified algorithm.
- signature
- Byte[]
The signature to verify.
- cancellationToken
- CancellationToken
A CancellationToken to cancel the operation.
Returns
The result of the verify operation. If the signature is valid the IsValid property of the returned VerifyResult will be set to true.
Exceptions
The specified algorithm does not match the key corresponding to the key identifier.
The local cryptographic provider threw an exception.
The key is invalid for the current operation.
The operation is not supported with the specified key.
The server returned an error. See Message for details returned from the server.