Aside from many projects I'm working on to learn more about general programming and this language it self. I was wondering how do programmers create "program specific files".

Examples:
Microsoft Word has .doc type files.
Adobe Acrobat Reader has .pdf files.
Photoshop has .psd files.

On a current project I'm working on I have data that gets saved to a file called .nex reason for that specific extension is because that is the name of the Project that file is used. Anyways the way I am currently doing this is encrypting the data using an RC4 Stream Cipher then putting that data into a stream writer and saving it to a file. I was wondering is this sufficient? Is it the way to do things and if so how would I go about creating a program specific file system for my project. The data that is stored within these files is nothing of great importance to any user but if they were to alter the data it will most defiantly have a drastic effect on the program its self.

Anyways all help is greatly appreciated for those that think I'm double posting. I just had to get these thoughts out of my head all at once to avoid losing them as I tend to forget things as my life is quite busy...

Thanks again,
- Poab

Recommended Answers

All 3 Replies

One thing I might recommend, is adding some header information to the file. It may not be necessary for your needs, but you may want to simply add some version information, just in case you modify the way data is stored in that file extension. Then you can check that the files you are using are compatible with your current implementation. Otherwise you may get some undesirable results with older formats. Other than that, I can't think of anything else you'll really need.

i think serialization should serve the purpose.

Hmm, I knew about the header/footer but I will most definatly add version information to the header to help keep better track of the versions of files. Thanks for that tip!

Also I read a couple articles about serialization and I was wondering, will anyone with the knowledge just be able to UN-serialize the object? Or when you serialize the object is it program specific?

I know that no matter how hard anyone tries to keep people from getting into data that is saved by any program that the developers want to keep secret that there are always ways around everything when it comes to software.

Thanks for the help,
- Poab

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.