C# Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

C# Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
MIME
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Encrypt a File using 256-bit Rijndael (also known as AES)

Download: Chilkat .NET Assemblies

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.KeyLength = 256;
c2.SecretKey = c2.GenerateSecretKey("myPassword");

// 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.KeyLength = 256;
c2a.SecretKey = c2.GenerateSecretKey("myPassword");

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


 

 

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

Email Component · XML Parser