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