SecDLL is a VB 6 project, wrapping a DLL that contains a variety of security and encryption features. No registration with me, or purchase from me, is required.
The purpose is to make strong powerful encryption / decryption and some other related things like MD5, etc, easily available at any level of strength, and any trade-off of speed that you want, with some very simple method calls, that can be instantly applied to any project, in any way.
All the dirty stuff is hidden, all you need to know is 'Encrypt this now', or 'Decrypt it now'. Very very simple. But you can use it at any strength from 'very very hard to break', to 'no one is going to break this in this lifetime'. You can stack methods and keys, too, for the compulsive among us.
Source code for a wrapper project demonstrating method calls and use is included. Source for the DLL is NOT included.
Reuse / distribution of the wrapper code and the DLL is free, no limits, no registration, no nags or 'cripples'.
To use it from this ZIP distro, SecDLL.DLL must be manually added to the registry via RegSrvr32, just like any other DLL. When you use it in a project, just treat it like any other DLL in your install distro script for auto-install.
This zip deployment has been tested on XP and other versions, it works fine, just make sure you get SecDLL.dll manually registered, or you will get 'Active X can not create component'. Of course, in a 'normal' install / distro, this happens by magic. In this ZIP SDK distro, which does not include any install script, you have to do it manually with Regsrvr32.exe.
If you find this useful, and want to drop me $ 25 or so via PayPal, please do so !
Download Zip file of VB 6 wrapper project source code and SECDLL - 60 KB zip file
SecDLL Methods
3 different encryption / decryption methods are included. BlowFish is the most secure, TextEncrypt is the fastest.
MyType selects a Key from the internal list of 11 'Strong' keys, each of which is 128 bytes or longer.
Data is the string to be handled.
Key is an externally created Key string, in lieu of using one of the internal keys. If len(Key) > 0, MyType is ignored.
***************************************** The methods are :
Public Function TextEncrypt(ByVal MyType As Integer, ByVal Data As String, Optional ByVal Key As String) As String
Public Function TextDecrypt(ByVal MyType As Integer, ByVal Data As String, Optional ByVal Key As String) As String
Public Function Blowfish_Encrypt(ByVal MyType As Integer, ByVal Data As String, Optional ByVal Key As String) As String
Public Function Blowfish_Decrypt(ByVal MyType As Integer, ByVal Data As String, Optional ByVal Key As String) As String
Public Function CryptoAPI_Decrypt_SLOW(ByVal Data As String, ByVal Password As String) As String
Public Function CryptoAPI_Encrypt_SLOW(ByVal Data As String, ByVal Password As String) As String
******************************
Typical usage ( single pass ) :
******************************
Dim objSEC As Object
Private Sub Form_Load()
Set objSEC = CreateObject("SecDLL.Security") ' SecDLL.DLL must be either registered, or in the calling directory.
temp = objSEC.TextEncrypt(3, Test)
temp = objSEC.TextDecrypt(3, temp)
End Sub
******************************
Optional multi-pass technique - improves security level by using as many different keys and methods as you want.
Here is a rather silly example of stacking passes and methods, using 5 different Keys and 2 types of encryption :
' encryption
UnEncryptedStringInput = "Hello, world"
temp = objSEC.TextEncrypt(3, UnEncryptedStringInput)
temp = objSEC.TextEncrypt(7, temp)
temp = objSEC.TextEncrypt(11, temp)
temp = objSEC.Blowfish_Encrypt(1, temp)
temp = objSEC.Blowfish_Encrypt(8, temp)
EncryptedString = temp
' decryption - note the reverse 'mirror' order of the encryption !!!!
temp = objSEC.Blowfish_Decrypt(8, EncryptedString)
temp = objSEC.Blowfish_Decrypt(1, temp)
temp = objSEC.TextDecrypt(11, temp)
temp = objSEC.TextDecrypt(7, temp)
temp = objSEC.TextDecrypt(3, temp)
*******************************
Public Function GetLockfromHardDrive()
Useage : Temp = objSEC.GetLockfromHardDrive
Returns an encoded 20 character string derived from the hard disk ID of C:
**********************************************************
Public Function MD5_FromFile(FileName As String) As String
Returns an MD5 hash from a given file.
************************************************************
Public Function MD5_FromString(SourceString As String) As String
Returns an MD5 hash from a supplied string