Share via


CryptographyClient.VerifyDataAsync Method

Definition

Overloads

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

Verifies the specified signature.

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

Verifies the specified signature.

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

Source:
CryptographyClient.cs
Source:
CryptographyClient.cs

Verifies the specified signature.

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)

Parameters

algorithm
SignatureAlgorithm

The SignatureAlgorithm to use. This must be the same algorithm used to sign the data.

data
Stream

The data corresponding to the signature.

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.

data is null.

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.

Remarks

The hash algorithm used to compute the digest is derived from the specified algorithm:

Applies to

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

Source:
CryptographyClient.cs
Source:
CryptographyClient.cs

Verifies the specified signature.

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)

Parameters

algorithm
SignatureAlgorithm

The SignatureAlgorithm to use. This must be the same algorithm used to sign the data.

data
Byte[]

The data corresponding to the signature.

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.

data is null.

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.

Remarks

The hash algorithm used to compute the digest is derived from the specified algorithm:

Applies to