CryptoAPI Wrapper

String Manipulation
Phil Fresle

Version Compatibility:

More information:
FrezCrypto is an ActiveX DLL that wraps the Microsoft CryptoAPI and allows the user to encrypt or decrypt strings based on the RC2 Block Algorithm or RC4 Stream Algorithm. The encrypted text can either be returned as is, or converted to hex codes of the ascii characters for easy storage (albeit twice the size). Block encryption is the more secure method in the majority of cases, but the encrypted string returned is usually larger than the string that is supplied. Stream encryption returns a string of the same size but is usually less secure.

A sample use of this technology would be to encypt a password for storing in a database that could otherwise be read in clear.

For added security you may want to put the code in a standard module or internal class rather than have it invoked in an external DLL.

NOTE: You must register ProjectCrypt.dll in the Bin directory using regsvr32 before you can use the sample project, which is located in the TestBed directory.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.