C# Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

C# Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
HTTP
IMAP
Encryption
MHT / HTML Email
MIME
RSA Encryption
S/MIME
Socket
Spider
Tar Archive
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
String
Byte Array
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

Encrypt a File using 128-bit Rijndael

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

This is a much better C# File-to-File Encryption example

Chilkat.Crypt2 c2 = new Chilkat.Crypt2();
c2.UnlockComponent("unlockCode");

// Set the encryption parameters.
c2.CryptAlgorithm = "rijndael";
c2.SecretKey = c2.GenerateSecretKey("myPassword");
c2.KeyLength = 256;

// The ReadFile and WriteFile methods are convenience methods
// for reading/writing the contents of an entire file into a byte array.
byte [] gifData = c2.ReadFile("dude.gif");
byte [] encryptedData = c2.EncryptBytes(gifData);
c2.WriteFile("encrypted.dat",encryptedData);

// Create a separate object for decryption
Chilkat.Crypt2 c2a = new Chilkat.Crypt2();

// The parameters must match...
c2a.CryptAlgorithm = "rijndael";
c2a.SecretKey = c2.GenerateSecretKey("myPassword");
c2a.KeyLength = 256;

byte [] encryptedData2 = c2a.ReadFile("encrypted.dat");
byte [] gifData2 = c2a.DecryptBytes(encryptedData2);
c2a.WriteFile("dude2.gif",gifData2);


 

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.

Email Component · XML Parser