C# Encrypting/Decrypting with Stream

This C# example demonstrates how to use Chilkat.Crypt2 to encrypt and decrypting using the .NET FileStream class: Chilkat.Crypt2 crypt = new Chilkat.Crypt2(); bool success = crypt.UnlockComponent("Anything for 30-day trial"); if (!success) { MessageBox.Show(crypt.LastErrorText); return; } crypt.CryptAlgorithm = "aes"; crypt.CipherMode = "cbc"; crypt.KeyLength = 128; crypt.SetEncodedIV("0000000000000000", "hex"); crypt.SetEncodedKey("abcdefghijklmnop", "ascii"); // Open input and output files as file streams… FileStream fsIn = […]

UIDL Max Size? (for POP3)

Question: I’m trying to find out the maximum size of the POP3 UIDL. I’ve found various POP3 specs, but they dont list field sizes. Do you know the max size or can you give me any links to this info? Answer: (from RFC 1939) The unique-id of a message is an arbitrary server-determined string, consisting of one to 70 characters […]

Bandwidth throttling small amounts of data.

Question: I’m sending ~50kb jpeg files alongside a very bandwidth-intensive application, so I want to make sure that my application doesn’t use more than 10kb/s, so that even those with slow connections will not have this other application impacted by mine. Answer: Concerning bandwidth throttling — it only makes sense with larger amounts of data (much more than 50K). Here’s […]

POP3 and SMTP multithread-safe?

Question: Is your component fully threadable? Is it thread safe to use in a multithreaded application? Does it Supports multiple (simultaneous) connections? Answer: Yes, it’s safe for multi-threading. However, you cannot have several threads all trying to share the same POP3 or SMTP session at the same time because they would all interfere with each other — for example, one […]

Download for Vista x64 (64-bit Microsoft Vista)

Question: I get an error when trying to load ChilkatDotNet2.dll on Vista x64: An attempt was made to load a program with an incorrect format. Does Chilkat have an x64-compatible .NET assembly? Answer: Yes, download the x64-compatible DLL from this URL: x64 compatible ChilkatDotNet2.dll Make sure you deploy the x64 DLL to the 64-bit Vista system. You may develop your […]

SMTP Protocol (in a Nutshell)

Question: SendMime requires a from  and  recipients address string, but the MIME message contains both .  The message I receive from the SendMime seems to ignore the addresses in the call and uses the one in the MIME.  So why require a from and recipient address? Answer: The SMTP protocol works like this: 1) A client connects to an SMTP […]

FTP Proxy Methods

Question: I need to connect to an ftp server and have to use the following command: ftp://username:password@hosname That means I’m not able to use the standard connection (first connect to host, then enter username and then password).  Is this possible using the Chilkat FTP2 component? Answer: Yes.  There are a number of different FTP proxy methods used by different types […]

Re-Sending Received Cookies with Subsequent HTTP GET’s

I’ve read information on your site about how to get the content at a URL and save it as an XML document. Below is a portion of the code to give you an idea of what I am referring to. String html = http.QuickGetStr(http://www.hocuspocus.com); … htmlToXml.WriteScriptToFile(xml, “out.xml”, “iso-8859-1”); My question is this: What if one cannot directly access the URL […]