Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.08.26;
Скачать: CL | DM;

Вниз

Wipe algorithms   Найти похожие ветки 

 
Stan   (2007-07-26 16:17) [0]

Всем привет. Большая просьба - подскажите где можно найти тех. описание алгоритмов стирания данных на магнитных носителях. К примеру DOD(там из несколько ), или Питера Гутмана. Часа три искал, ничего толкового не нашел. Нужно именно узнать как они работают, чтобы их реализовать.

Спасибо.


 
Yanis ©   (2007-07-26 20:59) [1]

Gutmann
procedure ZeroFillDelete(FileName: string);
var
 fs: TFileStream;
 i:  integer;
 procedure RandomWrite;
 var b:  byte;
 begin
   repeat
     b := Random(256); fs.Write(b, 1);
   until fs.Position + 1 >= fs.Size;
 end;
 procedure WritePattern(pattern: byte);
 const patt: array[5..31] of dword = ($555555, $AAAAAA, $924924, $492492,
       $249249, 0, $111111, $222222, $333333, $444444, $555555, $666666,
       $777777, $888888, $999999, $AAAAAA, $BBBBBB, $CCCCCC, $DDDDDD,
       $EEEEEE, $FFFFFF, $924924, $492492, $249249, $6DB6DB, $B6DB6D, $DB6DB6);
 var d: dword;
 begin
   d := patt[pattern] shl 8;
   repeat fs.Write(d, 3); until fs.Position + 3 >= fs.Size;
 end;
begin
 if not FileExists(FileName) then Exit;
 for i := 1 to 35 do
 try
   fs := TFileStream.Create(FileName, fmOpenReadWrite);
   try
     if (i < 5) or (i > 31) then RandomWrite
     else WritePattern(i);
   finally
     fs.Free;
   end;
 except Exit; end;
 DeleteFile(FileName);
end;

(c) Snowy
http://forum.vingrad.ru/index.php?show_type=forum&showtopic=91166


 
Yanis ©   (2007-07-26 21:01) [2]


> Нужно именно узнать как они работают

http://en.wikipedia.org/wiki/Gutmann_method


 
Yanis ©   (2007-07-26 21:03) [3]

Я вот ещё так для универа делал ^_^

procedure WipeDoD(const FileName: string;
                 var pb: TProgressBar;
                 var PercentLabel: TLabel;
                 bUpdateParent: Boolean);
var
 fs: TFileStream;
 i:  integer;
 bPB, bLB: Boolean;
 procedure WritePattern(pattern: byte);
 const patt: array[0..5] of Byte = ($00, $FF, $00, $F0, $0F, $00);
 begin repeat fs.Write(patt[pattern], 1); until fs.Position + 1 >= fs.Size; end;
begin
 if not FileExists(FileName) then Exit;

 bPB := not IsBadCodePtr(pb);
 bLB := not IsBadCodePtr(PercentLabel);
 if bPB then
   with pb do
     begin
       Min := 1;
       Position := 1;
       Max := 34;
     end;

 for i := 1 to 34 do
   try
     fs := TFileStream.Create(FileName, fmOpenReadWrite);
     try
       WritePattern(i);
       if bPB then
         begin
           pb.Position := i;
           if not bUpdateParent then pb.Update;
         end;
         
       if bLB then
         begin
           PercentLabel.Caption := Format("%d %%", [(pb.Position * 100) div pb.Max]);
           if not bUpdateParent then PercentLabel.Update;
         end;

       if bUpdateParent then pb.Parent.Update;

     finally
       FlushFileBuffers(fs.Handle);
       FreeAndNil(fs);
     end;
   except Exit; end;
 RenameFile(FileName, ExtractFilePath(FileName) + "$$$$$$$$.tmp");
 DeleteFile(FileName);
end;


 
Yanis ©   (2007-07-26 21:04) [4]


> Yanis ©   (26.07.07 21:03) [3]

По моему это как раз (америкосный?) DoD 5220.22-M.


 
Stan   (2007-07-26 21:27) [5]

Елки палки, я и забыл в википедию посмотреть. Спасибо что напомнили Yanis!
Совсем уже заработался..

Спасибо, но реализация не нужна, нужен принцип работы. Может кто то знает, как работает DOD 5200.28 -STD? Был бы очень благодарен.


 
Vlad Oshin ©   (2007-07-27 09:45) [6]

а в чем смысл такого паттерна?



Страницы: 1 вся ветка

Текущий архив: 2007.08.26;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.022 c
15-1185700339
IMHO
2007-07-29 13:12
2007.08.26
Что вы выбираете в своей жизни?


11-1168515485
Mabia
2007-01-11 14:38
2007.08.26
Установка Report&amp;Print в D6


2-1185883400
Игорь_
2007-07-31 16:03
2007.08.26
Печать


15-1185877291
savyhinst
2007-07-31 14:21
2007.08.26
[Прочессы играют в прятки] - Сенсация.ехе!


2-1186311698
Reals
2007-08-05 15:01
2007.08.26
StringReplace не работает для строки в Unicode