Exemple #1
0
 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);
 }
Exemple #2
0
 public KeyGenerationService(int keyLength)
 {
     _numberGetter = new NumberService(keyLength);
 }