Dim csp
Dim value
Dim pin
Dim dummy
Set csp = CreateObject("aloahacsp.aloaha_csp")
'value defines the string to be signed
value = "Hello World"
'in pin you can specify the PIN of your smartcard
'leaving PIN empty will cause Aloaha to display a PIN
'Dialog
pin = "230800"
'per default Aloaha delivers PKCS#1 signatures
'in case a detached PKCS#7 signature is required
'please uncomment the following line
'csp.forcePKCS7 = true
'it is also possible to switch between
'PKCS #7 attached and detached signatures
'Aloaha default are detached signatures
'to create PKCS#7 attached signatures please
'uncomment the following line
'attached = true
'dummy will hold the signature itself
'the first variable defines the card reader to be used
'valid values are 0-9
dummy = csp.simple_sign(1, CStr(value), CStr(pin))
MsgBox CStr(Len(dummy)\2)+" Bytes:"+vbcrlf+dummy
'show Certificate shows the certificate used to sign
'csp.show_Certificate
Set csp = nothing
Please send us your question.