Ignore:
Timestamp:
Nov 1, 2009, 12:18:57 PM (12 years ago)
Author:
Timo Eckhardt
Message:

switched from GmpBigInteger to PrimesBigInteger based on BouncyCastle BigInteger

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Factorizer/Factorizer.cs

    r419 r810  
    209209using Cryptool.PluginBase;
    210210using Cryptool.PluginBase.IO;
    211 using LibGmpWrapper;
     211using Primes.Bignum;
    212212
    213213namespace Factorizer
     
    281281          {
    282282            Factor = m_Input.ToString();
    283             Remainder = GmpBigInteger.One.ToString();
     283            Remainder = PrimesBigInteger.One.ToString();
    284284          }
    285285          else
    286286          {
    287             GmpBigInteger i = GmpBigInteger.Two;
     287            PrimesBigInteger i = PrimesBigInteger.Two;
    288288            while (i.Multiply(i).CompareTo(m_Input) <= 0)
    289289            {
    290               if (m_Input.Mod(i).CompareTo(GmpBigInteger.Zero) == 0)
     290              if (m_Input.Mod(i).CompareTo(PrimesBigInteger.Zero) == 0)
    291291              {
    292292                Factor = i.ToString();
     
    338338
    339339    #region Properties
    340     private GmpBigInteger m_Input = null;
     340    private PrimesBigInteger m_Input = null;
    341341    private string m_InputString;
    342342    [PropertyInfo(Direction.InputData, "String input", "A string that represents a natural number", "", true, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
     
    350350          try
    351351          {
    352             m_Input = new GmpBigInteger(m_InputString);
    353             if (m_Input.CompareTo(GmpBigInteger.Zero) <= 0)
     352            m_Input = new PrimesBigInteger(m_InputString);
     353            if (m_Input.CompareTo(PrimesBigInteger.Zero) <= 0)
    354354            {
    355355              m_Input = null;
Note: See TracChangeset for help on using the changeset viewer.