예제 #1
0
파일: NumbersTests.cs 프로젝트: tnimas/RSA
 public void RandomPrimeTest()
 {
     var numberManager = new NumberService(4);
     double average = 0;
     const int iterations = 1000;
     for (int i = 0; i < iterations; i++)
     {
         average += (double)numberManager.GetRandomPrime() / iterations;
     }
     Console.WriteLine("average = "+average);
 }
예제 #2
0
 public KeyGenerationService(int keyLength)
 {
     _numberGetter = new NumberService(keyLength);
 }