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
)
Public Shared Function VerifySignature (
certificate As X509Certificate2,
message As Byte(),
signature As Byte(),
hashalgorithm As Oid
) As Boolean
public:
static bool VerifySignature(
X509Certificate2^ certificate,
array<unsigned char>^ message,
array<unsigned char>^ signature,
Oid^ hashalgorithm
)
static member VerifySignature :
certificate : X509Certificate2 *
message : byte[] *
signature : byte[] *
hashalgorithm : Oid -> bool
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:
BooleanTrue if the signature is valid. Otherwise
False.
See Also