scp home

Home    CertX ActiveX Online Help Prev Next
Introduction
License
Certificate Request functions
csr_new
csr_export_to_file
csr_export
csr_sign
x.509 functions
x509_check_private_key
x509_checkpurpose
x509_export
x509_export_to_file
x509_free
x509_read
x509_parse
PKCS7 functions
pkcs7_decrypt
pkcs7_encrypt
pkcs7_sign
pkcs7_verify
RSA
pkey_new
pkey_export
pkey_export_to_file
pkey_get_public
pkey_get_private
public_encrypt
private_decrypt
open (decrypt)
seal (encrypt)
sign
verify
PKCS7 Constants

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

(c) Activecrypt Software LLC, 2004

 

Browser Based Help. Published by chm2web software.