Changeset 689


Ignore:
Timestamp:
Oct 8, 2009, 11:27:27 PM (12 years ago)
Author:
Sören Rinne
Message:
  • slight changes on LFSR/NLFSR
  • added QuickWatchPresentation to BerlekampMassey
Location:
trunk/CrypPlugins
Files:
2 added
4 edited

Legend:

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

    r419 r689  
    219219namespace Cryptool.BerlekampMassey
    220220{
    221     [Author("Soeren Rinne", "soeren.rinne@cryptool.de", "Ruhr-Universitaet Bochum, Chair for System Security", "http://www.trust.rub.de/")]
     221    [Author("Soeren Rinne", "soeren.rinne@cryptool.org", "Ruhr-Universitaet Bochum, Chair for System Security", "http://www.trust.rub.de/")]
    222222    [PluginInfo(false, "BerlekampMassey", "Berlekamp-Massey-Algorithm", "BerlekampMassey/DetailedDescription/Description.xaml", "BerlekampMassey/Images/icon2.png", "BerlekampMassey/Images/icon2.png", "BerlekampMassey/Images/icon2.png")]
    223223    public class BerlekampMassey : IThroughput
     
    231231        private int output;
    232232
     233        private BerlekampMasseyPresentation berlekampMasseyPresentation;
     234
    233235        #endregion
    234236
     
    241243        {
    242244            this.settings = new BerlekampMasseySettings();
    243             ((BerlekampMasseySettings)(this.settings)).LogMessage += Xor_LogMessage;
     245            ((BerlekampMasseySettings)(this.settings)).LogMessage += BerlekampMasseyLogMessage;
     246
     247            berlekampMasseyPresentation = new BerlekampMasseyPresentation();
     248            Presentation = berlekampMasseyPresentation;
    244249        }
    245250
     
    307312        }
    308313
    309         public UserControl Presentation
    310         {
    311             get { return null; }
    312         }
     314        public void Stop()
     315        {
     316        }
     317
     318        public void PostExecution()
     319        {
     320        }
     321
     322        public void PreExecution()
     323        {
     324        }
     325
     326        public UserControl Presentation { get; private set; }
    313327
    314328        public UserControl QuickWatchPresentation
    315329        {
    316             get { return null; }
    317         }
    318 
    319         public void Stop()
    320         {
    321         }
    322 
    323         public void PostExecution()
    324         {
    325         }
    326 
    327         public void PreExecution()
    328         {
     330            get { return Presentation; }
    329331        }
    330332
     
    347349        #region Private methods
    348350
    349         private void Xor_LogMessage(string msg, NotificationLevel logLevel)
     351        private void BerlekampMasseyLogMessage(string msg, NotificationLevel logLevel)
    350352        {
    351353            /*if (OnGuiLogNotificationOccured != null)
     
    459461            string polynomial = BuildPolynomialFromBinary(myC.ToCharArray());
    460462            polynomialOutput = polynomial;
     463            berlekampMasseyPresentation.setPolynomial(polynomial);
    461464            OnPropertyChanged("PolynomialOutput");
    462465           
    463             GuiLogMessage("C(D): " + myC, NotificationLevel.Info);
    464             GuiLogMessage("polynomial: " + polynomial, NotificationLevel.Info);
     466            //GuiLogMessage("C(D): " + myC, NotificationLevel.Info);
     467            //GuiLogMessage("polynomial: " + polynomial, NotificationLevel.Info);
    465468
    466469            return L;
     
    535538            {
    536539                string myInputString = input;
    537                 GuiLogMessage("myInputString: " + myInputString, NotificationLevel.Info);
     540                //GuiLogMessage("myInputString: " + myInputString, NotificationLevel.Info);
    538541
    539542                byte[] inputByte = StrToByteArray(myInputString);
     
    546549                // compute overall time
    547550                TimeSpan duration = stopTime - startTime;
     551                berlekampMasseyPresentation.setLength(output.ToString());
    548552                OnPropertyChanged("Output");
    549553               
    550                 GuiLogMessage("Complete!", NotificationLevel.Debug);
    551                 GuiLogMessage("Time used: " + duration, NotificationLevel.Info);
     554                //GuiLogMessage("Complete!", NotificationLevel.Debug);
     555                GuiLogMessage("Time used: " + duration, NotificationLevel.Debug);
    552556               
    553557            }
  • trunk/CrypPlugins/BerlekampMassey/BerlekampMassey.csproj

    r327 r689  
    5757  </ItemGroup>
    5858  <ItemGroup>
     59    <Compile Include="BerlekampMasseyPresentation.xaml.cs">
     60      <DependentUpon>BerlekampMasseyPresentation.xaml</DependentUpon>
     61    </Compile>
    5962    <Compile Include="Properties\AssemblyInfo.cs" />
    6063    <Compile Include="BerlekampMassey.cs" />
     
    7780    <Resource Include="Images\icon2.png" />
    7881  </ItemGroup>
     82  <ItemGroup>
     83    <Page Include="BerlekampMasseyPresentation.xaml">
     84      <Generator>MSBuild:Compile</Generator>
     85      <SubType>Designer</SubType>
     86    </Page>
     87  </ItemGroup>
    7988  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    8089  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • trunk/CrypPlugins/LFSR/LFSR.cs

    r651 r689  
    132132        }
    133133
    134         [PropertyInfo(Direction.OutputData, "Output stream", "LFSR Stream Output. Use this for bulk output.", "", false, true, DisplayLevel.Beginner, QuickWatchFormat.Hex, null)]
     134        /*[PropertyInfo(Direction.OutputData, "Output stream", "LFSR Stream Output. Use this for bulk output.", "", false, true, DisplayLevel.Beginner, QuickWatchFormat.Hex, null)]
    135135        public CryptoolStream OutputStream
    136136        {
     
    154154                OnPropertyChanged("OutputStream");
    155155            }
    156         }
     156        }*/
    157157
    158158        [PropertyInfo(Direction.OutputData, "String Output", "Produces the output bits as a string with length==rounds. Use this output without a clock input.", "", false, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
  • trunk/CrypPlugins/NLFSR/NLFSR.cs

    r651 r689  
    157157        }
    158158
    159         [PropertyInfo(Direction.OutputData, "Output stream", "NLFSR Stream Output. Use this for bulk output.", "", false, false, DisplayLevel.Beginner, QuickWatchFormat.Hex, null)]
     159        /*[PropertyInfo(Direction.OutputData, "Output stream", "NLFSR Stream Output. Use this for bulk output.", "", false, false, DisplayLevel.Beginner, QuickWatchFormat.Hex, null)]
    160160        public CryptoolStream OutputStream
    161161        {
     
    179179                OnPropertyChanged("OutputStream");
    180180            }
    181         }
     181        }*/
    182182
    183183        [PropertyInfo(Direction.OutputData, "String Output", "Produces the output bits as a string with length==rounds. Use this output without a clock input.", "", false, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
Note: See TracChangeset for help on using the changeset viewer.