CryptoSys PKI Pro Manual

sigVerifyData

Verify a signature value over data in a byte array.

Syntax

[VBA]
Public Function sigVerifyData ( _
    szSignature As String, _
    lpData() As Byte, _
    szCertOrKey As String, _
    szAlgName As String, _
    Optional nOptions As Long = 0 _
) As Long

Parameters

szSignature
Encoded signature value
lpData
Data to be verified.
szCertOrKey
Name of X.509 certificate or public key file, or a string containing the certificate in base64 representation, or the public key in PEM format, or a valid internal public key string.
szAlgName
Signature algorithm to be used:
"sha1WithRSAEncryption"
"sha224WithRSAEncryption"
"sha256WithRSAEncryption"
"sha384WithRSAEncryption"
"sha512WithRSAEncryption"
"md5WithRSAEncryption"
"ecdsaWithSHA1"
"ecdsaWithSHA224"
"ecdsaWithSHA256"
"ecdsaWithSHA384"
"ecdsaWithSHA512"
"RSA-PSS-SHA1"
"RSA-PSS-SHA224"
"RSA-PSS-SHA256"
"RSA-PSS-SHA384"
"RSA-PSS-SHA512"
"Ed25519"
nOptions
Use 0 for defaults. Add the bitflag PKI_SIG_USEDIGEST to pass the digest value of the data-to-be-signed as the lpData argument instead of the data itself. Add PKI_MGF_MGF1SHA1 (RSA-PSS only) to force the MGF hash function to be SHA-1 (default = same as signature hash algorithm).

Return Value

Long: Zero (0) if the signature is valid; otherwise a nonzero error code.
[PREV: sigSignFile...]   [Contents]   [Index]   
   [NEXT: smimeQuery...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.