Bagikan melalui


RSAKeyVault.VerifyHash Method

Definition

Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value.

public override bool VerifyHash (byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
override this.VerifyHash : byte[] * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
Public Overrides Function VerifyHash (hash As Byte(), signature As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Boolean

Parameters

hash
Byte[]

The hash value of the signed data.

signature
Byte[]

The signature data to be verified.

hashAlgorithm
HashAlgorithmName

The hash algorithm used to create the hash value.

padding
RSASignaturePadding

The padding mode.

Returns

true if the signature is valid; otherwise, false.

Exceptions

Hash algorithm hashAlgorithm with padding padding is not supported.

The server returned an error. See Message for details returned from the server.

Applies to