Ignore:
Timestamp:
Aug 9, 2010, 3:10:10 PM (11 years ago)
Author:
Sven Rech
Message:

Changed input and output of PrimesGenerator and PrimeTest to BigInteger instead of String

Location:
trunk/CrypPlugins/PrimesGenerator
Files:
2 edited

Legend:

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

    r809 r1783  
    99using Cryptool.PluginBase.Tool;
    1010using Primes.Bignum;
     11using System.Numerics;
    1112
    1213namespace Cryptool.PrimesGenerator
     
    5253
    5354
    54     private string m_OutputString;
    55     [PropertyInfo(Direction.OutputData, "Text output", "A primenumber", "", true, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
    56     public string OutputString
     55    private BigInteger m_OutputString;
     56    [PropertyInfo(Direction.OutputData, "BigInteger output", "A primenumber", "", true, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
     57    public BigInteger OutputString
    5758    {
    5859      get { return this.m_OutputString; }
     
    135136        {
    136137          case 0:
    137             OutputString = PrimesBigInteger.Random(m_Input).NextProbablePrime().ToString();
     138            OutputString = BigInteger.Parse(PrimesBigInteger.Random(m_Input).NextProbablePrime().ToString());
    138139            break;
    139140          case 1:
     
    143144              result = PrimesBigInteger.RandomM(m_Input).NextProbablePrime();
    144145            }
    145             OutputString = result.ToString();
     146            OutputString = BigInteger.Parse(result.ToString());
    146147            break;
    147148        }
  • trunk/CrypPlugins/PrimesGenerator/PrimesGenerator.csproj

    r1487 r1783  
    8888      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    8989    </Reference>
     90    <Reference Include="System.Numerics" />
    9091    <Reference Include="System.Xaml" />
    9192    <Reference Include="System.Xml.Linq">
Note: See TracChangeset for help on using the changeset viewer.