Click or drag to resize

MessageSignatureVerifySignature Method

Verifies that a digital signature is valid by determining the hash value in the signature using the provided public key and comparing it to the hash value of the provided data.

Namespace:  PKI.Utils
Assembly:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax
public static bool VerifySignature(
	X509Certificate2 certificate,
	byte[] message,
	byte[] signature,
	Oid hashalgorithm
)

Parameters

certificate
Type: System.Security.Cryptography.X509CertificatesX509Certificate2
An X509Certificate2 object that represents signer certificate.
message
Type: SystemByte
Signed message (without signature).
signature
Type: SystemByte
Digital signature (encrypted hash) to verify.
hashalgorithm
Type: System.Security.CryptographyOid
Hash algorithm that was used to hash the data.

Return Value

Type: Boolean
True if the signature is valid. Otherwise False.
See Also