I'm actually curious on this one.
Hypothetically, let's say I wanted to make a notepad program, so the user can make documents. The user can put in anything s/he desired without a limit.
For privacy so only that program opens it, can I use a specific (undesigned) extension for the program? E.g. Save the file as: "test.abcz". If that's possible, can other default programs (word, notepad) open and see the contents?
I was thinking of designing a notepad based application. It sounds fairly simple, and I think it could assist in my learning of some basics of C.
Thanks! :)
The only way to make the content of a document unreadable by another software is to apply some sort of transformation on it (cryptography) that could be decoded only by your software, or by a equivalent software that uses the same crypto algorithm as long you have a "key".
The file extension is just a hint to the file manager so it can open a software associated by it, but nothing stops to either manually choose the software or to attempt to open the file directly in the application.
If do you want to train a little, you can try to implement a notepad that saves the file with a ROT13 algorithm.