| Easy Encryption |
Applies To |
|
| OS: VB: |
NT, 9x, 2k, XP 5, 6 |
|
Download...(1 kb)
What is different about this encryption class?
| 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