 |
Certificate Request functions |
 |
x.509 functions |
 |
PKCS7 functions |
 |
RSA |
|
verify
Verify signature
Syntax
Function verify (data As String, signature As String, pub_key) As Long
Returns 1 if the signature is correct, 0 if it is incorrect, and -1 on error.
verify() verifies that the signature
is correct for the specified data using the
public key associated with pub_key_id. This
must be the public key corresponding to the private key used for signing.
Dim privkey as Variant
Dim pubkey as Variant
Set privkey = ssl.pkey_new()
ssl.pkey_export privkey, o
Set pubkey = ssl.pkey_get_public(o)
ssl.sign "hi", sig, privkey, True
IsCorrect = ssl.verify("hig", sig, pubkey)
If IsCorrect = 1 Then
MsgBox "Signature is correct"
End If |
|