소스 검색

some cleanups in ClpBigInteger

Ugochukwu Mmaduekwe 20 시간 전
부모
커밋
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,
   ClpPack,
   ClpBitOperations,
   ClpBitOperations,
   ClpArrayUtilities,
   ClpArrayUtilities,
-  ClpISecureRandom,
   ClpIRandom;
   ClpIRandom;
 
 
 resourcestring
 resourcestring
@@ -3386,7 +3385,7 @@ begin
     Exit;
     Exit;
   end;
   end;
   LN := &Inc().SetBit(0);
   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
   begin
     LN := LN.Add(FTwo);
     LN := LN.Add(FTwo);
   end;
   end;
@@ -3844,8 +3843,7 @@ begin
     Exit;
     Exit;
   end;
   end;
 
 
-  Result := LN.CheckProbablePrime(ACertainty, TSecureRandom.MasterRandom as IRandom,
-    ARandomlySelected);
+  Result := LN.CheckProbablePrime(ACertainty, TSecureRandom.MasterRandom, ARandomlySelected);
 end;
 end;
 
 
 function TBigInteger.RabinMillerTest(const ACertainty: Int32;
 function TBigInteger.RabinMillerTest(const ACertainty: Int32;