Trying to use CkEmail.AesEncrypt method (with password string), and resulting email is not encrypted, although success is returned.
This is using the C++ Linux library.
I haven't used this function, so I'm just guessing here, but when do you call AesEncrypt? If you call it after setting your body text, attachments, etc... try calling it before, or if you already call it before, try calling it after.
If that doesn't help, could you post some sample code?
Also, are you using the latest version of the library?
I call it when the email is complete, of course. Doesn't make sense (to me) to try to encrypt before everything is ready to go.
I'm using 9.5.0-x86_64.
Ahh, I see!
It is a streaming cypher. Makes sense. I imagine it's always padding the last block (if necessary) until something else comes in (if it works that way).
I'll give it a try.
Tried it both ways.
CkEmail email; email.AesEncrypt("password"); email.LoadEml("Test.eml"); // Properly formatted, with attachments. email.SaveEml("Test-enc.eml");
CkEmail email; email.LoadEml("Test.eml"); // Properly formatted, with attachments. email.AesEncrypt("password"); email.SaveEml("Test-enc.eml");
Neither test-enc.eml files were encrypted.
I'll have a look. This functionality should already have been in Chilkat's QA test suite and automatically tested prior to every new version release -- may be something was amiss...
I tested it, and everything worked fine for me. The resultant email (after calling AesEncrypt) will contain the same top-level unencrypted header, but all message bodies, sub-parts (related parts, attachments, attached messages, etc.) will be condensed into a single AES encrypted blob that is base64 encoded.
Maybe the confusion is that you expected the top-level header to also be encrypted?