Hi. I am trying to do a program whereby the user needs to enter some information before he/she can use the file (some sort of a lock). My problem is how can I put the file together with the exe so that when i enter the correct information, the exe will run the file???
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.