Securely erasing a file using simple methods?
- by Jason
Hello,
I am using C# .NET Framework 2.0. I have a question relating to file shredding.
My target operating systems are Windows 7, Windows Vista, and Windows XP. Possibly Windows Server 2003 or 2008 but I'm guessing they should be the same as the first three.
My goal is to securely erase a file.
I don't believe using File.Delete is secure at all. I read somewhere that the operating system simply marks the raw hard-disk data for deletion when you delete a file - the data is not erased at all. That's why there exists so many working methods to recover supposedly "deleted" files. I also read, that's why it's much more useful to overwrite the file, because then the data on disk actually has to be changed. Is this true? Is this generally what's needed?
If so, I believe I can simply write the file full of 1's and 0's a few times.
I've read:
http://www.codeproject.com/KB/files/NShred.aspx
http://blogs.computerworld.com/node/5756
http://blogs.computerworld.com/node/5687
http://stackoverflow.com/questions/4147775/securely-deleting-a-file-in-c-net