Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Script to Encrypt / Decrypt Files
This VBScript demonstrates how to use the Chilkat encryption ActiveX component to encrypt / decrypt any type of file. set crypt = CreateObject("Chilkat.Crypt2")
crypt.UnlockComponent "unlockCode"
crypt.CryptAlgorithm = "AES"
crypt.KeyLength = 128
crypt.SecretKey = crypt.GenerateSecretKey("myPassword")
myData = crypt.ReadFile("test.xml")
myEncrypted = crypt.EncryptBytes(myData)
crypt.WriteFile "encrypted.dat",myEncrypted
eData = crypt.ReadFile("encrypted.dat")
myDecrypted = crypt.DecryptBytes(eData)
crypt.WriteFile "testDecrypted.xml",myDecrypted
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.