|
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
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.
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>
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.
|
|
|
|
|