2
0
Martijn Laan 1 сар өмнө
parent
commit
79e06b18d8

+ 3 - 2
Projects/Src/Compiler.SetupCompiler.pas

@@ -355,6 +355,7 @@ const
   DefaultTypeEntryNames: array[0..2] of PChar = ('full', 'compact', 'custom');
   DefaultTypeEntryNames: array[0..2] of PChar = ('full', 'compact', 'custom');
 
 
   MaxDiskSliceSize = 2100000000;
   MaxDiskSliceSize = 2100000000;
+  DefaultKDFIterations = 220000;
 
 
 function ExtractStr(var S: String; const Separator: Char): String;
 function ExtractStr(var S: String; const Separator: Char): String;
 var
 var
@@ -2846,7 +2847,7 @@ begin
       end;
       end;
     ssEncryptionKeyDerivation: begin
     ssEncryptionKeyDerivation: begin
         if Value = 'pbkdf2' then
         if Value = 'pbkdf2' then
-          SetupEncryptionHeader.KDFIterations := 200000
+          SetupEncryptionHeader.KDFIterations := DefaultKDFIterations
         else if Copy(Value, 1, 7) = 'pbkdf2/' then begin
         else if Copy(Value, 1, 7) = 'pbkdf2/' then begin
           I := StrToIntDef(Copy(Value, 8, Maxint), -1);
           I := StrToIntDef(Copy(Value, 8, Maxint), -1);
           if I < 1 then
           if I < 1 then
@@ -7730,7 +7731,7 @@ begin
     ReserveBytes := 0;
     ReserveBytes := 0;
     TimeStampRounding := 2;
     TimeStampRounding := 2;
     SetupEncryptionHeader.EncryptionUse := euNone;
     SetupEncryptionHeader.EncryptionUse := euNone;
-    SetupEncryptionHeader.KDFIterations := 220000;
+    SetupEncryptionHeader.KDFIterations := DefaultKDFIterations;
     SetupHeader.MinVersion.WinVersion := 0;
     SetupHeader.MinVersion.WinVersion := 0;
     SetupHeader.MinVersion.NTVersion := $06010000;
     SetupHeader.MinVersion.NTVersion := $06010000;
     SetupHeader.MinVersion.NTServicePack := $100;
     SetupHeader.MinVersion.NTServicePack := $100;