Example #1
0
 /// <summary>
 /// Constructs a new RSASettings
 /// detects the number of cores of the system and sets those to maximum number of cores
 /// which can be used
 /// </summary>
 public RSASettings()
 {
     CoresAvailable.Clear();
     for (int i = 0; i < Environment.ProcessorCount; i++)
     {
         CoresAvailable.Add((i + 1).ToString());
     }
     CoresUsed = Environment.ProcessorCount - 1;
 }
 /// <summary>
 /// Constructs a new QuadraticSieveSettings
 ///
 /// Also calculates the amount of cores which can be used for the quadratic sieve
 /// </summary>
 public QuadraticSieveSettings(QuadraticSieve quadraticSieve)
 {
     this.quadraticSieve = quadraticSieve;
     CoresAvailable.Clear();
     for (int i = 0; i < Environment.ProcessorCount; i++)
     {
         CoresAvailable.Add((i + 1).ToString());
     }
     CoresUsed = Environment.ProcessorCount - 1;
 }
Example #3
0
        public KeySearcherSettings(KeySearcher ks, OpenCLManager oclManager)
        {
            keysearcher = ks;
            RefreshDevicesList(oclManager);

            CoresAvailable.Clear();
            for (int i = -1; i < Environment.ProcessorCount; i++)
            {
                CoresAvailable.Add((i + 1).ToString());
            }
            CoresUsed = Environment.ProcessorCount - 1;

            chunkSize = 21;

            KeyManager = new SimpleKeyManager("");
        }