I'm writing a program that is supposed to be used for educational purposes on high school/college level, and I want to password-protect some features so that only the teacher can access them.
Now, the problem is how to save this teacher password. I guess I will have to encrypt it and write it to file when the program exits, but how do I prevent people from simply deleting this file, thus resetting the password? I could always set the filename to something strange and put it in a hard-to-find location, but this seems like a lame way of doing it.
Thoughts on how do to this? I don't need extreme security as I don't expect anyone to put that much effort on breaking the password. I just need something that is secure enough not to be cracked during a lesson.