Re: Encrypting image files
- Posted by Dan_M Jul 01, 2009
- 1154 views
If this is at all possible with EU then I need someone to give me a sample. It is not within my capability :(
Anyone have some spare time to help?
Not really, but if I understand, you have some .jpg files which you want to distribute with your program, so that a user clicking within your program will see the pics, but you don't want to distribute the pics "in the clear".
If that's right, then the "blowfish" previously mentioned sounds like it can do what you want, as follows:
1. write a small program to read in all your .jpg files, one at a time, in binary format, and immediately write them back out with some other extent, like "*.pic", or something, BUT PUT THE BLOWFISH PROCEDURE, "Set_Encrypt()" in your code BEFORE YOU OPEN THE FILES TO WRITE (or before EACH file, I'm not sure, haven't used it)
that will give you a set of files to distribute that are encrypted.
2. continue writing your main program, and put the Blowfish procedure Set_Encrypt() with the parameter "ENC_AUTO", which should automatically decrypt any file which you ask to be read in.
3. then proceed with the decrypted pics however you wish.
I'm not sure how the app user applies a password, but I suspect the Blowfish doc tells how somewhere.
HTH? dan

