To use the encryption implementations simply insert the class file into your Visual Basic project and declare it in the general declaration area of your form or module (Blowfish used as example):

Public Blowfish As New clsBlowfish

You can also declare the class files local to specific functions or subs:

Dim Blowfish As New clsBlowfish


Then simply use the functions provided in the class file to encrypt/decrypt files or strings. Example:

Dim a As String
a = "This is a sample string."
a = Blowfish.EncryptString(a, "secretkey", False)

The EncryptString function will return an encrypted string which is then placed in string variable "a". To decrypt the string simply go:

a = Blowfish.DecryptString(a, "secretkey", False)

If you set the optional Boolean value to True, when encrypting, it will return the cipher text in Hexadecimal format making it easier to transport over unstable mediums such as chat or email. However, it does significantly increases the size of the string (nearly double). I would recommend using compression before encryption (especially with files). Provided is an extremely fast and efficient Huffman compression algorithm for Visual Basic. When decrypting you also must specify the value as True to make sure it reads the encrypted string as Hexadecimal and not plain text (otherwise it will decrypt into an unintelligible string). Also included are functions for encrypting and decrypting files. It is assumed that anyone looking for cryptography in their projects already have obtained enough experience in Visual Basic to figure out how to use these implementations fully without the need of a lengthy explanation.

Note: All algorithms contain standardized function names and variable naming conventions.