AsymmetricSignatureDeformatter.VerifySignature Method

Definition

Verifies the signature.

Overloads

VerifySignature(Byte[], Byte[])

When overridden in a derived class, verifies the signature for the specified data.

VerifySignature(HashAlgorithm, Byte[])

Verifies the signature from the specified hash value.

VerifySignature(Byte[], Byte[])

Source:
AsymmetricSignatureDeformatter.cs
Source:
AsymmetricSignatureDeformatter.cs
Source:
AsymmetricSignatureDeformatter.cs

When overridden in a derived class, verifies the signature for the specified data.

C#
public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature);

Parameters

rgbHash
Byte[]

The data signed with rgbSignature.

rgbSignature
Byte[]

The signature to be verified for rgbHash.

Returns

true if rgbSignature matches the signature computed using the specified hash algorithm and key on rgbHash; otherwise, false.

Remarks

You must specify a public key and a hash algorithm before calling this method.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

VerifySignature(HashAlgorithm, Byte[])

Source:
AsymmetricSignatureDeformatter.cs
Source:
AsymmetricSignatureDeformatter.cs
Source:
AsymmetricSignatureDeformatter.cs

Verifies the signature from the specified hash value.

C#
public virtual bool VerifySignature(System.Security.Cryptography.HashAlgorithm hash, byte[] rgbSignature);

Parameters

hash
HashAlgorithm

The hash algorithm to use to verify the signature.

rgbSignature
Byte[]

The signature to be verified.

Returns

true if the signature is valid for the hash; otherwise, false.

Exceptions

The hash parameter is null.

Remarks

This method sets the hash algorithm to be used before verifying the signature of the input hash algorithm value.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1