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
AES Compress and EncryptDownload: Chilkat .NET Assemblies Load a file into memory, compress it, AES encrypt, write it out, and then do the reverse. Chilkat.Crypt2 crypt = new Chilkat.Crypt2(); crypt.UnlockComponent("30-day-trial"); crypt.CryptAlgorithm = "aes"; crypt.KeyLength = 128; crypt.SecretKey = crypt.GenerateSecretKey("sharedKey"); byte [] inData = crypt.ReadFile("timesheets.pdf"); byte [] cData = crypt.CompressBytes(inData); byte [] eData = crypt.EncryptBytes(cData); crypt.WriteFile("encrypted.dat",eData); // Reverse... byte [] inData2 = crypt.ReadFile("encrypted.dat"); byte [] dData = crypt.DecryptBytes(inData2); byte [] decompressedData = crypt.InflateBytes(dData); crypt.WriteFile("timesheets2.pdf",decompressedData); Important: The download for this
example does not contain the ChilkatDotNet.dll which |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.