Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have project in C++ ... I should write a program that delete files and folders for always with DoD and Gutmann methods I search about this methods and find somthing but I can't understand some parts:

for example in Gutmann methods here write we should overwrite with binary data like ( 01110111 01110111 01110111) but how?
Or in DoD estandadrs I found 7stage:
overwrite with this data:

0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random

but how? What's the meaning of overwrite with 0xf6?
Posted

1 solution

It means that you must follow a set procedure when you delete the file. Assuming your file is 100 bytes long for DoD you:

1) You do not delete the file to start with.
2) You open the file for exclusive, write access as a binary file of bytes.
3) You re-write every byte in the file to 0xF6. Flush, and ensure the HDD image has been overwritten. The entire file on the hard disk now consists of 100 bytes, all of them then same hexadecimal vlaue: 0xF6.
4) Repeat 3, using the data 0x00, then 0xFF, then use random data for each byte, and so forth.
5) Close the file, and delete it.

The whole idea of this is that it overcomes the magnetic hysteresis in the hard disk material and makes it "impossible" to read back the original content of the file.

Note: it is not a good idea to try this on flash memory sticks: they work differently...
 
Share this answer
 
Comments
Mehrdad-p70 19-Mar-11 2:48am    
thanks
can you tell me which way is good for flash memory?
and how can I open the file for exclusive with C++ codes?
how can I write access as a binary file of bytes with C++ code?
I should search ... What?
please help me
thanks in advance
have a good time
OriginalGriff 19-Mar-11 4:20am    
Flash memory: there is no "good way": flash operates differently in that blocks are not necessarily overwritten at all, they are remapped to a fresh area.
As for the rest: These are basics. If you don't know how to open a file for writing then I would suggest that DoD delete procedures are a little outside your league at the moment... Try something a little simpler until you are comfortable with normal operations!
Mehrdad-p70 19-Mar-11 4:19am    
excuse me but if can explain part 2 and 3 especially2 ... what you mean?
Mehrdad-p70 24-Mar-11 6:29am    
please say what you mean "Flush, and ensure the HDD image has been overwritten"?
how this happen?
and how we can be sure that it happen correctly?
OriginalGriff 24-Mar-11 6:34am    
I am not explaining that! There is way too much background fro me do have the time: Try to google for HDD Cache and you may see what the problem is...:laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900