Download...(1 kb)
What is different about this encryption class?
- It is very easy to use.
- Drop it into your project and you are ready to go.
- The encrypted string is in HEX and human readable - makes it possible to store it in INI files or Registry
- No external dependencies
That's it. Note that this class does not provide any industrial stregth encryption, but most of the
time you don't need it. Don't confuse it with PGP, DES or anything else.
Here is a little piece of code showing how easy it is to encrypt/decrypt stuff.
| Add the following code to class |
Option Explicit
Private Sub Demo()
Dim oEncryption As cEncrypt
Dim sEncryptedText As String
Dim sDecryptedText As String
Const TEXT_TO_ENCRYPT As String = "Encrypt this"
Set oEncryption = New cEncrypt
With oEncryption
'this step is optional
'if PASSWORD property is not set,
'the class will use the default password
.PASSWORD = "1234567890"
'all it takes to encrypt text
sEncryptedText = oEncryption.Encrypt(TEXT_TO_ENCRYPT)
'now let's decrypt it
sDecryptedText = oEncryption.Decrypt(sEncryptedText)
End With
Set oEncryption = Nothing
End Sub