CryptoSys API Library Manual

Using with COM/ASP

The file diCryptOCX.dll is an ActiveX wrapper that provides an interface to most functions in the CryptoSys API. Strictly it's an ActiveX DLL, not an OCX, but we think three-letter acronyms with an "X" in them are cool.

  1. Install CryptoSys API on the target machine. Use the Developer or Server Test Version; the Personal Version will not work with IIS or ASP.
  2. Copy the file diCryptOCX.dll into a convenient directory on the target machine.
  3. Register the ActiveX DLL with the command
    regsvr32 diCryptOCX.dll
  4. Either in a VB6 project set a reference to diCryptOCX.dll (Project>References>Browse...) then
    Dim oGen = New diCryptoOCX.gen
    Debug.Print "Version=" & oGen.Version
    
  5. Or, in an ASP page
    Dim oGen
    Set oGen = Server.CreateObject("diCryptOCX.gen")
    Response.Write "Version=" & oGen.Version
    

Refer to the syntax and details of the classes and methods of the ActiveX interface.

Note: Almost all the COM/ASP methods require the data to be encoded in hexadecimal. Handling byte array types in VBScript is fraught with problems so we don't even offer the option.

For examples, see the test code apiocxtests.asp and other ASP test pages provided in the distribution (look in the folder C:\Program Files\CryptoSys\COM).

[Contents] [Index]

[HOME]   [NEXT: "Hello world" programs...]

Copyright © 2001-9 D.I. Management Services Pty Ltd. All rights reserved.