Digital Signature Functions

Functions and Properties on this page explain how to use a smart card to create a digital signature. Digital Signature Functions are NOT FREEWARE. Please contact aloaha@wrocklage.de for an evaluation key.


Functions

The function hash digest the given information into a HASH.
hash(ByVal StrInputBA As Variant, ByRef StrOutputBA As Variant, ByVal Algo As AvailableHashAlgos) As Boolean

For example:

Dim StrInputBA() as Byte
Dim StrOutputBA() as Byte
Dim Algo as long
Dim HashString as string
Dim InputString as string


InputString = "Aloaha"
algo = 1 'use SHA1

StrInputBA = ACSP.STR2BA(InputString)

if ACSP.hash(StrInputBA,StrOutputBA,Algo)=true then
          HashString=ACSP.BA2STR(StrOutputBA)
          MsgBox HashString
end if


Properties

The property signHASH_BA returns the digital signature for a given hash and certificate fingerprint. Please consult "Certificate Management" to learn how to find a fingerprint for a given smart card or reader.

signHASH_BA(ByVal CertificateThumbPrint As String, ByVal ctype As CertificateType, ByVal inputHASH As Variant, ByVal SignatureStandard As SignatureType, ByVal SignatureHashType As AvailableHashAlgos, ByVal SignatureEncType As AvailableEncryptionAlgos) As Variant

Example:

Dim SignatureBA() as Byte
Dim Signature as String
Dim FingerPrint as string
Dim CType as long
Dim inputHASH() as Byte
Dim SignatureStandard as long
Dim HashType as long
Dim EncType as long

FingerPrint=<Fingerprint of Certificate to be used>
CType = 0 'for non repudiation certificate (1 for signature cert)
HashType = 1                   'SHA1
EncType = 1                     'RSA
SignatureStandard=1      'PKCS #1

SignatureBA=ACCSP.signHASH_BA(FingerPrint, ctype,inputHASH, SignatureStandard,HashType, EncType) 

Signature=ACSP.BA2STR(SignatureBA)

msgbox Signature



 VB6 sample code and executable (119,94 KB)

Aloaha Software / Knowledge Base / Smart Card API / Aloaha CSP API / Digital Signature Functions

More Functions and Properties

Please contact aloaha@wrocklage.de for a more detailed overview of available functions and properties. For example encryption.
create PDF Software

Digital Signature Functions

Any questions?
Aloaha Software - Digital Signature Functions
ProductsKnowledge BaseShopSupportPress
Deutsche VersionEnglish version