I don't know if this makes sense or is what you're asking for. However, could you encrypt the file? And then provide a decryption algorithm in the exe file. If the right information is provided, the contents of the file are read into some sort of buffer and decrypted? Perhaps that's nothing more than restating your question?
Perhaps you could use the blowfish algorithm? I keep hearing about it all over the place although I don't really have experience with its uses/purpose. As far as I can tell, it's meant simply for passwords or short words and phrases. If not to encrypt the file, itself, you should be able to use it to encrypt a password or something the user must enter before the file can be accessed?
In any case, I'm attaching the C++ implementation of the blowfish algorithm.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
Offline 13,645 posts
since Feb 2002