Persits Software, Inc. Web Site
Main Menu:  Home |  News |  Manual |  Tasks |  Object Reference |  Crypto 101 |  FAQ |  Download & Buy |  Clients |  Live Demo |  Contact
 Navigator:  Home |  Tasks |  Start Using AspEncrypt
Manage Cryptographic Providers and Contexts Learn about Windows Cryptography
  Start Using AspEncrypt in an ASP or VB Project
Before the AspEcnrypt component can be used, it must be registered on your machine. The AspEncrypt.exe installation program registers the component automatically. If you need to move the component to another machine you may copy the file AspEncrypt.dll to that machine and place it in any directory accessible to the current user, such as c:\winnt\system32. To register the component manually, open the MS DOS prompt and execute the command:

regsvr32 c:\path\aspencrypt.dll

  Using AspEncrypt in a Visual Basic Project
Open your VB project, select References... from the Project menu, check the box next to Persits Software AspEncrypt 1.0 in the References dialog, then click OK.

You can now declare a CryptoManager object variable as follows:

Dim CM As CryptoManager

Create an instance of the CryptoManager object as follows:

Set CM = New CryptoManager

The CryptoManager object is the main AspEncrypt object which serves as an "object factory" for all the other objects: CryptoBlob, CryptoCert, CryptoContext, CryptoKey, CryptoMessage, CryptoName, and CryptoStore. These objects are never created directly but via properties and methods of other objects. Declare object variables for these objects as follows:

Dim Context As ICryptoContext
Dim Key As ICryptoKey

etc.

  Using AspEncrypt in an ASP Environment
In the ASP environment, you may create an instance of the CryptoManager object with ASP script, as follows:

<%
Set CM = Server.CreateObject("Persits.CryptoManager")
%>

You may also use the HTML OBJECT tag, as follows:

<OBJECT RUNAT="Server" ID="CM" PROGID="Persits.CryptoManager">
</OBJECT>

  AspEncrypt ODBC Datasource

Several code samples shipped with the AspEncrypt component use a sample Microsoft Access database AspEncrypt.mdb found in the directory \db of the installation. To use this database, you must create the system ODBC datasource AspEncrypt pointing to this database file.

Learn about Windows Cryptography Manage Cryptographic Providers and Contexts

Search this Site
  This site is owned and maintained by Persits Software, Inc. Copyright © 2000 - 2010. All Rights Reserved.