|
te(S, 1, 1);
Memo1.Lines.Add(Format(
? '数据库文件名:%s,%s' +
? '10进制时间串:%d,%s' +
? '16进制时间串:%x,%s' +
? '数据库密码串:%s',
? [FName, #13#10, DateStr, #13#10, DateStr, #13#10, #13#10 + S + #13#10]));
if (DateStr >= $90000000) and (DateStr < $B0000000) then begin
? WSec := DateStr xor $903E6C94;
? WTime := Date2 + WSec / 8192 * 2;
end else begin
? WSec := DateStr xor $803E6C94;
? WTime := Date1 + WSec / 8192;
? if WSec and $30000000 <> 0 then begin
?? WSec := $40000000 - WSec;
?? WTime := Date1 - WSec / 8192 / 2;
? end;
end;
Memo1.Lines.Add('创建时间:' + DateTimeToStr(WTime));
if WTime < Date1 then begin
? for i := 0 to 9 do begin
?? EncodeArray[i * 2] := (Trunc(WTime) - Trunc(Date0)) xor UserCode xor $F000;
?? // Xor $F000 就是“高位取反”
?? EncodeArray[i * 2 + 1] := InhereCode;
? end;
end;
if (WTime >= Date1) and (WTime < Date2) then begin
? for i := 0 to 9 do begin
?? EncodeArray[i * 2] := (Trunc(WTime) - Trunc(Date1)) xor UserCode;
?? EncodeArray[i * 2 + 1] := InhereCode;
? end;
end;
if WTime >= Date2 then begin
? for i := 0 to 9 do begin
?? EncodeArray[i * 2] := (Trunc(WTime) - Trunc(Date1)) xor UserCode;
?? EncodeArray[i * 2 + 1] := InhereCode xor 1;
?? // Xor 1 就是“末位取反”
? end;
end;
PassCode := '';
for i := 0 to 19 do begin
? N := EncodeArray xor ReaderArray;
//??if N <> 0 then PassCode := PassCode + Chr(N);
? if N <> 0 then PassCode := PassCode + WideChar(N);
end;
Result.FileType := 'ACCESS-2000';
Result.FileTime := WTime;
Result.PassCode := PassCode;
end;
procedure TPassForm.GetAllPass(Sender: TObject);
begin
Memo1.Clear;
Memo1.Lines.BeginUpdate;
if Trim(Edit1.Text) = '' then Exit;
ExecDirectory(Edit1.Text);
Memo1.Lines.EndUpdate;
end;
procedure TPassForm.SetCurTime(Sender: TObject);
begin
Self.SetTime(Pick1.Date);
end;
end
|
|