Download source files - 129 Kb

I saw an article (April 1999 - VCJ) by Kurtz, and wrote a simple ATL DLL to use it in an ASP page.
I just wanted to show a number of ways (examples) on how to implement it. This article has 4 projects:
ATL (the DLL), VC++ (using the DLL), VB (using the DLL), and ASP (using the DLL)
This was all his code (ARACrypt.cpp/h) and I just used his Class to play.
Note: I did find something funny in the VB example. When I ran it on WinNT, the Decryption didn't seem to
work correctly (see comments in VB code). When I returned encryption data into the text field (Text1.Text)
the Decryption would be wrong (some characters). Once I had the returned encryption data go into a
String
variable it all worked well (see VB code below). When on the Win2000 OS it worked fine the other way...go
figure? Of course I fixed it, but check it out if you have two Operating Systems (WinNT/Win2000).
Option Explicit
Dim CryptTest As CRYPTITLib.Cryptor
Private Sub Command1_Click()
Set CryptTest = New CRYPTITLib.Cryptor
CryptTest.PassPhrase = Text1.Text
CryptTest.StringToCrypt = Text2.Text
CryptTest.DoCrypting
Dim strTest As String
strTest = CryptTest.ReturnCrypted
Text3.Text = strTest
CryptTest.StringToCrypt = strTest
CryptTest.DoCrypting
Text4.Text = CryptTest.ReturnCrypted
Set CryptTest = Nothing
End Sub
I hope that others find this useful.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here