Changeset 810


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

Location:
trunk/CrypPlugins/Factorizer
Files:
2 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;
  • trunk/CrypPlugins/Factorizer/Factorizer.csproj

    r4 r810  
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    55    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    6     <ProductVersion>9.0.21022</ProductVersion>
     6    <ProductVersion>9.0.30729</ProductVersion>
    77    <SchemaVersion>2.0</SchemaVersion>
    88    <ProjectGuid>{3A4251D0-DAB0-4A1C-94A4-75BC2C2A5DEE}</ProjectGuid>
     
    3232  </PropertyGroup>
    3333  <ItemGroup>
    34     <Reference Include="LibGmpWrapper, Version=1.0.2987.28787, Culture=neutral, processorArchitecture=x86">
    35       <SpecificVersion>False</SpecificVersion>
    36       <HintPath>..\Primes\Primes.References\LibGmpWrapper.dll</HintPath>
    37     </Reference>
    3834    <Reference Include="PresentationCore">
    3935      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     
    7167      <Name>CrypPluginBase</Name>
    7268    </ProjectReference>
     69    <ProjectReference Include="..\Primes\Primes\Primes.csproj">
     70      <Project>{2830F337-A7A3-4A68-87AC-64F3AA79C70B}</Project>
     71      <Name>Primes</Name>
     72    </ProjectReference>
    7373  </ItemGroup>
    7474  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset for help on using the changeset viewer.