Просмотр исходного кода

some cleanups in ClpBigInteger

Ugochukwu Mmaduekwe 20 часов назад
Родитель
Сommit
0dfc6bad32
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      CryptoLib/src/Math/ClpBigInteger.pas

+ 2 - 4
CryptoLib/src/Math/ClpBigInteger.pas

@@ -28,7 +28,6 @@ uses
   ClpPack,
   ClpBitOperations,
   ClpArrayUtilities,
-  ClpISecureRandom,
   ClpIRandom;
 
 resourcestring
@@ -3386,7 +3385,7 @@ begin
     Exit;
   end;
   LN := &Inc().SetBit(0);
-  while not LN.CheckProbablePrime(100, TSecureRandom.MasterRandom as IRandom, False) do
+  while not LN.CheckProbablePrime(100, TSecureRandom.MasterRandom, False) do
   begin
     LN := LN.Add(FTwo);
   end;
@@ -3844,8 +3843,7 @@ begin
     Exit;
   end;
 
-  Result := LN.CheckProbablePrime(ACertainty, TSecureRandom.MasterRandom as IRandom,
-    ARandomlySelected);
+  Result := LN.CheckProbablePrime(ACertainty, TSecureRandom.MasterRandom, ARandomlySelected);
 end;
 
 function TBigInteger.RabinMillerTest(const ACertainty: Int32;