 |
Certificate Request functions |
 |
x.509 functions |
 |
PKCS7 functions |
 |
RSA |
|
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 |
|