Prev: CFileDialog filter for files without extension
Next: Lets create comp.microsoft.public.vc.mfc or alt.microsoft.public.vc.mfc
From: ab` on 14 May 2010 18:03 I'm looking for suggestions for encrypting/decrypting strings. In the app, there is a (potentially huge) unicode string which is an entire xml file, ready to be written to disk. I'd like to encrypt it with a user-supplied password, write it to a file, and later read the file and decrypt it (in memory). Post decryption, it will be run through an xml parser. All the encryption solutions I've run into seem overly complicated for such a basic task. Suggestions?
From: Goran on 17 May 2010 03:10 On May 15, 12:03 am, ab` <a...(a)absent.com> wrote: > I'm looking for suggestions for encrypting/decrypting strings. > > In the app, there is a (potentially huge) unicode string which is an > entire xml file, ready to be written to disk. I'd like to encrypt it > with a user-supplied password, write it to a file, and later read the > file and decrypt it (in memory). Post decryption, it will be run > through an xml parser. > > All the encryption solutions I've run into seem overly complicated for > such a basic task. What is your purpose? If "I don't want my client to see my XML", then zlib (RFC 1950) with *.strange_extension_here might be enough. If "my client wants to encrypt with a password", then zip with a password or blowfish. Or zlib+blowfish (I push for compression because XML compresses well, but without knowing the size of your data, that might be an overkill). Goran.
From: Joseph M. Newcomer on 17 May 2010 12:18 You really have to decide why you are encrypting. For example, if security really matters, you will need to use something like RSA-256 or better, or one of the new encryption standards from NIST. There are APIs to do this. PGP is actually pretty powerful, there are lots of PGP libraries around. joe On Fri, 14 May 2010 15:03:21 -0700, ab` <ab(a)absent.com> wrote: >I'm looking for suggestions for encrypting/decrypting strings. > >In the app, there is a (potentially huge) unicode string which is an >entire xml file, ready to be written to disk. I'd like to encrypt it >with a user-supplied password, write it to a file, and later read the >file and decrypt it (in memory). Post decryption, it will be run >through an xml parser. > >All the encryption solutions I've run into seem overly complicated for >such a basic task. > >Suggestions? Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: John H. on 17 May 2010 16:38 ab` wrote: > I'm looking for suggestions for encrypting/decrypting strings. I have used 7zip with some success. It is an open source compressor/ encrypter. I programaticaly called the command line version via a Win32 command shell. I think they have a related SDK that might also be of use. http://www.7-zip.org/
From: ab` on 18 May 2010 21:04
Minimal encryption is all that's needed, just enough to make it obvious. I've tried the 7-Zip, .zip classes, but they all seem to rely on writing the file to disk first, then encrypting, then deleting. |