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

sign

Generate SHA1-RSA signature.

Syntax

Function sign (data As String, signature, priv_key, [Base64NoNL]) As Boolean

Returns True on success or False on failure. If successful the signature is returned in signature.

sign() computes a signature for the specified data by using SHA1 for hashing followed by encryption using the private key associated with priv_key_id. Note that the data itself is not encrypted.

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.