can any one help me how to protect files using C
can any one help me how to protect files using C
Besides changing file permissions using fchmod (assuming UNIX) I don't know how it could be done. Perhaps someone else have an idea.
I think it depends on what you mean by "protect".
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
In Microsoft Visual Studio it's _chmod() and _wchmod()
This ensures that nobody can access your file, thus "protecting" it.Code:remove( filename );
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}
encrypt it with a random sequence of numbers then delete the sequence, guaranteed noone will access it.
Open the file, never close it, and hope your have a crappy OS that doesn't allow concurrent file accesses!
Quzah.
Hope is the first step on the road to disappointment.