Changeset 936


Ignore:
Timestamp:
Dec 1, 2009, 4:36:33 PM (12 years ago)
Author:
pretzsch
Message:

+ MD5 plugin: Work on presentation

Location:
trunk/CrypPlugins/MD5
Files:
5 added
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/MD5/Algorithm/PresentableMD5.cs

    r895 r936  
    105105            }
    106106        }
     107               
     108        /// <summary>
     109        /// Returns the next state by retrieving it from history or performing the next algorithm step without changing the current state
     110        /// </summary>
     111        /// <seealso cref="PresentableMD5State"/>
     112        public PresentableMD5State NextState
     113        {
     114            get
     115            {
     116                                if (IsInFinishedState)
     117                                        return CurrentState;
     118               
     119                                if (!HistoryHasMoreStates)
     120                {
     121                        PresentableMD5State previousState = CurrentState;
     122                        AddNewState();
     123                        PerformStep(previousState, CurrentState);
     124                                       
     125                        CurrentStateNumber--;
     126                        CurrentState = StateHistory[CurrentStateNumber];
     127                                }
     128                               
     129                                return StateHistory[CurrentStateNumber + 1];
     130            }
     131        }
    107132
    108133        /// <summary>
     
    138163            OnPropChanged("CurrentState");
    139164            OnPropChanged("LastState");
     165                        OnPropChanged("NextState");
    140166            OnPropChanged("CurrentStateNumber");
    141167            OnPropChanged("IsInFinishedState");
  • trunk/CrypPlugins/MD5/Algorithm/PresentableMD5State.cs

    r895 r936  
    7979            }
    8080        }
     81               
     82        /// <summary>
     83        /// Returns the function name of the inner round function currently used
     84        /// </summary>
     85        public string RoundFunctionName
     86        {
     87            get
     88            {
     89                                switch (Round)
     90                                {
     91                                        case 1:
     92                                                return "F";
     93                                        case 2:
     94                                                return "G";
     95                                        case 3:
     96                                                return "H";
     97                                        case 4:
     98                                                return "I";
     99                                        default:
     100                                                return "";
     101                                }
     102            }
     103        }
    81104
    82105        /// <summary>
  • trunk/CrypPlugins/MD5/MD5.csproj

    r897 r936  
    7676      <DependentUpon>DataBlockDisplay.xaml</DependentUpon>
    7777    </Compile>
     78    <Compile Include="Presentation\Displays\FunctionNameDisplay.xaml.cs">
     79      <DependentUpon>FunctionNameDisplay.xaml</DependentUpon>
     80    </Compile>
    7881    <Compile Include="Presentation\Displays\HashAccumulatorDisplay.xaml.cs">
    7982      <DependentUpon>HashAccumulatorDisplay.xaml</DependentUpon>
     
    8184    <Compile Include="Presentation\Displays\CompressionVariableDisplay.xaml.cs">
    8285      <DependentUpon>CompressionVariableDisplay.xaml</DependentUpon>
     86    </Compile>
     87    <Compile Include="Presentation\Displays\DataIntegerDisplay.xaml.cs">
     88      <DependentUpon>DataIntegerDisplay.xaml</DependentUpon>
    8389    </Compile>
    8490    <Compile Include="Presentation\Displays\LabelledIntegerDisplay.xaml.cs">
     
    180186      <Generator>MSBuild:Compile</Generator>
    181187    </Page>
     188    <Page Include="Presentation\Displays\FunctionNameDisplay.xaml">
     189      <SubType>Designer</SubType>
     190      <Generator>MSBuild:Compile</Generator>
     191    </Page>
    182192    <Page Include="Presentation\Displays\HashAccumulatorDisplay.xaml">
    183193      <SubType>Designer</SubType>
     
    188198      <SubType>Designer</SubType>
    189199    </Page>
     200    <Page Include="Presentation\Displays\DataIntegerDisplay.xaml">
     201      <Generator>MSBuild:Compile</Generator>
     202      <SubType>Designer</SubType>
     203    </Page>
    190204    <Page Include="Presentation\Displays\LabelledIntegerDisplay.xaml">
    191205      <Generator>MSBuild:Compile</Generator>
     
    271285      <SubType>Designer</SubType>
    272286      <Generator>MSBuild:Compile</Generator>
     287    </Page>
     288    <Page Include="Presentation\States\StyleDictionary.xaml">
     289      <Generator>MSBuild:Compile</Generator>
     290      <SubType>Designer</SubType>
    273291    </Page>
    274292    <Page Include="Presentation\States\UninitializedPresentation.xaml">
  • trunk/CrypPlugins/MD5/Presentation/Displays/RoundAndStepDisplay.xaml

    r897 r936  
    66        <Label FontSize="16" HorizontalAlignment="Left" Width="70" Height="50" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Right">Round:</Label>
    77        <Label Margin="76,0,0,0" Content="{Binding Round}" Width="70" HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" />
    8         <Label HorizontalAlignment="Left" Width="70" Content="{Binding Step}" Margin="228,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" />
     8        <Label HorizontalAlignment="Left" Width="70" Content="{Binding RoundStep}" Margin="228,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" />
    99        <Label FontSize="16" Margin="152,0,0,0" HorizontalAlignment="Left" Width="70" VerticalContentAlignment="Center" HorizontalContentAlignment="Right">Step:</Label>
    1010    </Grid>
  • trunk/CrypPlugins/MD5/Presentation/PresentationContainer.xaml

    r895 r936  
    44    xmlns:converters="clr-namespace:Cryptool.MD5.Presentation.Converters"
    55             xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays"
    6         Background="White" Height="435" Width="761">
     6        Background="White" Height="560" Width="816">
    77    <UserControl.Resources>
    88        <converters:BytesToStringConverter x:Key="bytesToStringConverter"/>
    99        <converters:MD5StateToUserControlConverter x:Key="md5StateToUserControlConverter"/>
    1010    </UserControl.Resources>
    11     <Grid>
    12         <displays:StateDescriptionDisplay Height="41" Margin="8,12,8,0" VerticalAlignment="Top" />
    13         <Button Height="23" Margin="0,0,480,66" Name="previousStepButton" VerticalAlignment="Bottom" Click="previousStepButton_Click" HorizontalAlignment="Right" Width="150">&lt;&lt; Previous</Button>
    14         <Button Height="23" Margin="0,0,324,66" Name="nextStepButton" VerticalAlignment="Bottom" Click="nextStepButton_Click" HorizontalAlignment="Right" Width="150">Next &gt;&gt;</Button>
    15         <Button Height="23" Margin="0,0,168,66" Name="endOfRoundButton" VerticalAlignment="Bottom" Click="endOfRoundButton_Click" Width="150" HorizontalAlignment="Right">End of Round &gt;&gt;&gt;</Button>
    16         <Button Height="23" HorizontalAlignment="Right" Margin="0,0,12,66" x:Name="endOfCompressionButton" VerticalAlignment="Bottom" Width="150" Click="endOfCompressionButton_Click" Content="End of Block &gt;&gt;&gt;&gt;"/>
    17         <UserControl Margin="8,59,8,95" Name="statePresentationContainer"  Content="{Binding CurrentState,Converter={StaticResource md5StateToUserControlConverter}}"/>
    18         <displays:HashAccumulatorDisplay Height="36" Margin="0,0,12,24" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="306" DataContext="{Binding CurrentState}" />
    19     </Grid>
    20    
     11    <Viewbox>
     12        <Grid Height="560" Width="816">
     13            <displays:StateDescriptionDisplay Height="41" Margin="8,12,8,0" VerticalAlignment="Top" />
     14            <Button Height="23" Margin="0,0,480,66" Name="previousStepButton" VerticalAlignment="Bottom" Click="previousStepButton_Click" HorizontalAlignment="Right" Width="150">&lt;&lt; Previous</Button>
     15            <Button Height="23" Margin="0,0,324,66" Name="nextStepButton" VerticalAlignment="Bottom" Click="nextStepButton_Click" HorizontalAlignment="Right" Width="150">Next &gt;&gt;</Button>
     16            <Button Height="23" Margin="0,0,168,66" Name="endOfRoundButton" VerticalAlignment="Bottom" Click="endOfRoundButton_Click" Width="150" HorizontalAlignment="Right">End of Round &gt;&gt;&gt;</Button>
     17            <Button Height="23" HorizontalAlignment="Right" Margin="0,0,12,66" x:Name="endOfCompressionButton" VerticalAlignment="Bottom" Width="150" Click="endOfCompressionButton_Click" Content="End of Block &gt;&gt;&gt;&gt;"/>
     18            <UserControl Margin="8,60,8,100" Name="statePresentationContainer"  Content="{Binding CurrentState,Converter={StaticResource md5StateToUserControlConverter}}"/>
     19            <displays:HashAccumulatorDisplay Height="36" Margin="0,0,12,24" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="306" DataContext="{Binding CurrentState}" />
     20        </Grid>
     21    </Viewbox>
    2122</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/PresentationContainer.xaml.cs

    r895 r936  
    3030            InitializeComponent();
    3131
     32            Width = double.NaN;
    3233            Height = double.NaN;
    33             Width = double.NaN;
    3434        }
    3535
     
    3737        {
    3838            md5.NextStep();
    39             new ReadDataPresentation();
    4039        }
    4140
  • trunk/CrypPlugins/MD5/Presentation/States/AddedLengthPresentation.xaml

    r895 r936  
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    44             xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays"
    5     Height="300" Width="480">
     5    Height="400" Width="800">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    613    <Grid>
    7         <TextBlock Margin="12,104,12,0" Name="textBlock1" Text="We have added the length at the end of our data buffer, which now looks like this:" TextWrapping="Wrap" Height="53" VerticalAlignment="Top" />
    8         <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Height="52" VerticalAlignment="Top" Margin="12,163,12,0" />
     14        <TextBlock Margin="8,104,8,0" x:Name="textBlock1" TextWrapping="Wrap" Height="53" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" ><Run Text="We have added the length at the end of our data buffer"/><Run Text=":"/></TextBlock>
     15        <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Height="52" VerticalAlignment="Top" Margin="8,161,8,0" />
    916    </Grid>
    1017</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/AddedPaddingBytesPresentation.xaml

    r897 r936  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="566"
     4    Height="400" Width="800"
    55    xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    613    <Grid>
    7         <TextBlock Margin="12,100,12,0" Name="label1" Height="28" VerticalAlignment="Top" Text="We have added the padding bytes and our data now looks like this:"></TextBlock>
    8         <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Margin="12,134,12,0" Height="88" VerticalAlignment="Top" />
     14        <TextBlock Margin="8,102,8,0" Name="label1" Height="28" VerticalAlignment="Top" Text="We have added the padding bytes and our data now looks like this:" Style="{DynamicResource textBlockStyle}"></TextBlock>
     15        <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Margin="8,134,8,0" Height="88" VerticalAlignment="Top" />
    916    </Grid>
    1017</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/AddingLengthPresentation.xaml

    r897 r936  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="458">
     4    Height="400" Width="800">
     5        <UserControl.Resources>
     6                <ResourceDictionary>
     7                        <ResourceDictionary.MergedDictionaries>
     8                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     9                        </ResourceDictionary.MergedDictionaries>
     10                </ResourceDictionary>
     11        </UserControl.Resources>
    512    <Grid>
    6         <TextBlock Margin="12,44,12,0" Name="textBlock1" Text="We now calculate the length of our data (without the padding bytes from the previous step) in bits:
    7                    " TextWrapping="Wrap" Height="47" VerticalAlignment="Top" />
    8         <TextBlock Height="61" Margin="12,0,12,55" Name="textBlock2" Text="In the next step, we write the little-endian representation of this value into the next 8 bytes of our data buffer." TextWrapping="Wrap" VerticalAlignment="Bottom" />
    9         <Label Margin="12,116,12,0" Name="label1" Height="40" VerticalAlignment="Top" Content="{Binding CurrentState.LengthInBit}" FontSize="18" />
     13        <TextBlock Margin="8,84,8,0" Name="textBlock1" Text="We now calculate the length of our data (without the padding bytes from the previous step) in bits:
     14                   " TextWrapping="Wrap" Height="74" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" />
     15        <TextBlock Height="108" Margin="8,0,8,8" Name="textBlock2" Text="In the next step, we write the little-endian representation of this value into the next 8 bytes of our data buffer." TextWrapping="Wrap" VerticalAlignment="Bottom" Style="{DynamicResource textBlockStyle}" />
     16        <Label Margin="8,162,8,198" Name="label1" Content="{Binding CurrentState.LengthInBit}" FontSize="18" Style="{DynamicResource labelStyle}" />
    1017    </Grid>
    1118</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/AddingPaddingBytesPresentation.xaml

    r897 r936  
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    44             xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays"
    5     Height="344" Width="550">
     5    Height="400" Width="800">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    613    <Grid>
    7         <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Height="40" Margin="12,43,12,0" VerticalAlignment="Top" />
    8         <TextBlock Margin="12,89,12,0" Name="textBlock1" Text="and start the padding process by appending one single '1' bit to the end of our data. Since we are working with octets, this is the same as adding a '10000000' octet, thus, a byte with value 0x08, to the end of our data." TextWrapping="Wrap" Height="71" VerticalAlignment="Top" />
    9         <TextBlock Margin="12,166,12,0" Name="textBlock2" Text="We continue by appending zero bytes to the data. We choose the number of zero bytes so that our resulting data length is 8 bytes short of the next multiple of 64. That way, we can append 8 bytes more and get an exact multiple of 64 as our data length." TextWrapping="Wrap" Height="91" VerticalAlignment="Top" />
    10         <TextBlock Height="25" Margin="12,12,12,0" Name="textBlock3" Text="We take the incomplete block of data that we've read," TextWrapping="Wrap" VerticalAlignment="Top" />
     14        <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Height="40" Margin="8,75,8,0" VerticalAlignment="Top" />
     15        <TextBlock Margin="8,119,8,186" Name="textBlock1" Text="and start the padding process by appending one single '1' bit to the end of our data. Since we are working with octets, this is the same as adding a '10000000' octet, thus, a byte with value 0x08, to the end of our data." TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}" />
     16        <TextBlock Margin="8,248,8,0" x:Name="textBlock2" TextWrapping="Wrap" Height="120" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" ><Run Text="We "/><Run Text="also "/><Run Text="append zero bytes to the data. We choose the number of zero bytes so that our resulting data length is 8 bytes short of the next multiple of 64. That way, we can append 8 bytes more and get an exact multiple of 64 as our data length."/></TextBlock>
     17        <TextBlock Height="25" Margin="8,46,8,0" Name="textBlock3" Text="We take the incomplete block of data that we've read," TextWrapping="Wrap" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" />
    1118    </Grid>
    1219</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/FinishedCompressionPresentation.xaml

    r897 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.FinishedCompressionPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="378" Width="570" xmlns:my="clr-namespace:Cryptool.MD5.Presentation.Displays">
    5     <Grid>
    6         <my:HashAccumulatorDisplay DataContext="{Binding LastState}" Height="50" Margin="10,10,12,0" VerticalAlignment="Top" />
    7         <my:CompressionVariableDisplay DataContext="{Binding LastState}" Margin="10,101,12,0" Height="50" VerticalAlignment="Top" />
    8         <my:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Height="50" Margin="10,191,12,0" VerticalAlignment="Top">
    9         </my:HashAccumulatorDisplay>
    10         <Label Height="28" HorizontalContentAlignment="Center" Margin="10,67,12,0" Name="label1" VerticalAlignment="Top" VerticalContentAlignment="Center">+</Label>
    11         <Label HorizontalContentAlignment="Center" Margin="10,157,12,0" Name="label2" Height="28" VerticalAlignment="Top">=</Label>
    12         <TextBlock Height="21" Margin="12,0,12,100" Name="textBlock1" VerticalAlignment="Bottom" Text="We have finished the compression and updated our accumulators." />
    13     </Grid>
     4    xmlns:my="clr-namespace:Cryptool.MD5.Presentation.Displays" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.FinishedCompressionPresentation"
     5    Height="400" Width="800" mc:Ignorable="d">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
     13        <Grid>
     14                <my:HashAccumulatorDisplay DataContext="{Binding LastState}" Height="70" Margin="8,8,8,0" VerticalAlignment="Top" />
     15                <my:CompressionVariableDisplay DataContext="{Binding LastState}" Margin="8,115,8,0" VerticalAlignment="Top" Height="70" d:LayoutOverrides="VerticalAlignment" />
     16                <my:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Height="70" Margin="8,223,8,0" VerticalAlignment="Top"/>
     17                <TextBlock Height="28" Margin="8,83,8,0" x:Name="label1" VerticalAlignment="Top" HorizontalAlignment="Center" Style="{DynamicResource textBlockStyle}"><Run Text="+"/></TextBlock>
     18                <TextBlock Margin="8,191,8,181" x:Name="label2" HorizontalAlignment="Center" Style="{DynamicResource textBlockStyle}"><Run Text="="/></TextBlock>
     19                <TextBlock Height="33" Margin="8,0,8,8" x:Name="textBlock1" VerticalAlignment="Bottom" Text="We have finished the compression and updated our accumulators." Style="{DynamicResource textBlockStyle}" />
     20        </Grid>
    1421</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/FinishedPaddingPresentation.xaml

    r897 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.FinishedPaddingPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="300">
     4    xmlns:Cryptool_MD5_Presentation_Displays="clr-namespace:Cryptool.MD5.Presentation.Displays" x:Class="Cryptool.MD5.Presentation.States.FinishedPaddingPresentation"
     5    Height="400" Width="800">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    513    <Grid>
    6         <TextBlock Height="21" Margin="12,12,12,0" Name="textBlock1" VerticalAlignment="Top" Text="We have finished padding and have" TextWrapping="Wrap" />
    7         <TextBlock Margin="12,85,12,124" Name="textBlock2" Text="bytes of data left in our buffer. We continue by calling the compression function for this input." TextWrapping="Wrap" />
    8         <Label Margin="12,39,12,0" Name="label1" Height="40" VerticalAlignment="Top" Content="{Binding CurrentState.DataLength}" FontSize="18" />
     14        <TextBlock Height="43" Margin="8,8,8,0" x:Name="textBlock1" VerticalAlignment="Top" Text="We have finished padding and have" TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}" TextAlignment="Center" />
     15        <TextBlock Margin="8,99,12,0" x:Name="textBlock2" TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}" VerticalAlignment="Top" Height="37" TextAlignment="Center" ><Run Text="bytes of data left in our buffer"/><Run Text=":"/></TextBlock>
     16        <Label Margin="8,55,16,0" x:Name="label1" Height="40" VerticalAlignment="Top" Content="{Binding CurrentState.DataLength}" FontSize="18" HorizontalContentAlignment="Center" />
     17        <TextBlock HorizontalAlignment="Left" Margin="8,0,0,123.626" Style="{StaticResource textBlockStyle}" VerticalAlignment="Bottom" Width="784" Text="We continue by calling the compression function for this input."/>
     18        <Cryptool_MD5_Presentation_Displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Margin="8,140,8,0" Height="88" VerticalAlignment="Top" />
    919    </Grid>
    1020</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/FinishedPresentation.xaml

    r895 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.FinishedPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    44             xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays"
    5     Height="304" Width="772">
     5    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.FinishedPresentation"
     6    Height="400" Width="800" mc:Ignorable="d">
     7        <UserControl.Resources>
     8                <ResourceDictionary>
     9                        <ResourceDictionary.MergedDictionaries>
     10                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     11                        </ResourceDictionary.MergedDictionaries>
     12                </ResourceDictionary>
     13        </UserControl.Resources>
    614    <Grid>
    7         <TextBlock Height="17" Margin="12,42,12,0" Name="textBlock1" VerticalAlignment="Top" Text="We have now finished compression of the last block of data. Our hash accumulators look like this:" TextWrapping="Wrap" />
    8         <displays:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Height="76" VerticalAlignment="Top" Margin="12,65,12,0" />
    9         <TextBlock Margin="12,163,12,0" Name="textBox1" Height="35" VerticalAlignment="Top">We obtain our final result by simply concatenating the lower-endian representation of our accumulators:</TextBlock>
    10         <displays:DataBlockDisplay Data="{Binding HashValueBytes}" Margin="12,204,12,0" Height="58" VerticalAlignment="Top" />
     15        <TextBlock Height="59" Margin="8,26,8,0" x:Name="textBlock1" VerticalAlignment="Top" Text="We have now finished compression of the last block of data. Our hash accumulators look like this:" TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}" />
     16        <displays:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Margin="8,99,8,0" VerticalAlignment="Top" Height="80" d:LayoutOverrides="VerticalAlignment" />
     17        <displays:DataBlockDisplay Data="{Binding HashValueBytes}" Margin="8,270,8,0" Height="74" VerticalAlignment="Top" />
     18        <TextBlock HorizontalAlignment="Right" Margin="0,0,8,134" Style="{StaticResource textBlockStyle}" Width="783.999" VerticalAlignment="Bottom"><Run Text="We obtain our final result"/><Run Text=", the actual MD5 hash value,"/><Run Text=" by simply concatenating the lower-endian representation of our accumulators:"/></TextBlock>
    1119    </Grid>
    1220</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/FinishedRoundPresentation.xaml

    r895 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.FinishedRoundPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="300">
     4    xmlns:Cryptool_MD5_Presentation_Displays="clr-namespace:Cryptool.MD5.Presentation.Displays" x:Class="Cryptool.MD5.Presentation.States.FinishedRoundPresentation"
     5    Height="400" Width="800">
     6        <UserControl.Resources>
     7                <Style x:Key="textBlockStyle" TargetType="{x:Type TextBlock}">
     8                        <Setter Property="TextWrapping" Value="Wrap"/>
     9                        <Setter Property="FontSize" Value="16pt"/>
     10                </Style>
     11        </UserControl.Resources>
    512    <Grid>
     13           
     14        <TextBlock Margin="8,118,8,0" Style="{StaticResource textBlockStyle}" VerticalAlignment="Top" Height="30.373"><Run Text="We"/><Run Text=" have finished all 16 steps of this round."/></TextBlock>
     15        <Cryptool_MD5_Presentation_Displays:CompressionVariableDisplay DataContext="{Binding CurrentState}" Margin="8,168.373,8,150.627" />
     16        <Cryptool_MD5_Presentation_Displays:RoundAndStepDisplay VerticalAlignment="Top" HorizontalAlignment="Left" DataContext="{Binding CurrentState}" Margin="8,8,0,0"/>
    617           
    718    </Grid>
  • trunk/CrypPlugins/MD5/Presentation/States/FinishedRoundStepPresentation.xaml

    r895 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.FinishedRoundStepPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="300">
     4    xmlns:Cryptool_MD5_Presentation_Displays="clr-namespace:Cryptool.MD5.Presentation.Displays" x:Class="Cryptool.MD5.Presentation.States.FinishedRoundStepPresentation"
     5    Height="400" Width="800">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    513    <Grid>
     14           
     15        <Cryptool_MD5_Presentation_Displays:RoundAndStepDisplay VerticalAlignment="Top" HorizontalAlignment="Left" DataContext="{Binding CurrentState}" Margin="8,8,0,0"/>
     16        <TextBlock Margin="8,108,8,0" Style="{StaticResource textBlockStyle}" VerticalAlignment="Top" Text="We've finished this step and calculated the new values of our temporary variables:" Height="30.373"/>
     17        <Cryptool_MD5_Presentation_Displays:CompressionVariableDisplay DataContext="{Binding CurrentState}" Margin="8,158.373,8,160.627" />
    618           
    719    </Grid>
  • trunk/CrypPlugins/MD5/Presentation/States/FinishingCompressionPresentation.xaml

    r897 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.FinishingCompressionPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    44    xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays"
    5     Height="382" Width="506">
     5    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.FinishingCompressionPresentation"
     6    Height="400" Width="800" mc:Ignorable="d">
     7        <UserControl.Resources>
     8                <ResourceDictionary>
     9                        <ResourceDictionary.MergedDictionaries>
     10                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     11                        </ResourceDictionary.MergedDictionaries>
     12                        <Style x:Key="textBlockStyle" TargetType="{x:Type TextBlock}">
     13                                <Setter Property="TextWrapping" Value="Wrap"/>
     14                                <Setter Property="FontSize" Value="16pt"/>
     15                        </Style>
     16                </ResourceDictionary>
     17        </UserControl.Resources>
    618    <Grid>
    7         <TextBlock Margin="12,12,12,0" Name="textBlock1" Text="We have finished with the last round of the compression. Now it's time to update our accumulators. We do this by simply adding the variables A - D to them." TextWrapping="Wrap" Height="39" VerticalAlignment="Top" />
    8         <displays:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Height="51" Margin="12,57,12,0" VerticalAlignment="Top" />
    9         <displays:CompressionVariableDisplay DataContext="{Binding CurrentState}" Margin="12,148,12,0" Height="51" VerticalAlignment="Top" />
    10         <displays:HashAccumulatorDisplay Height="51" Margin="12,239,12,0" VerticalAlignment="Top">
    11             <displays:HashAccumulatorDisplay.Effect>
    12                 <BlurEffect></BlurEffect>
    13             </displays:HashAccumulatorDisplay.Effect>
    14         </displays:HashAccumulatorDisplay>
    15         <Label Margin="12,114,12,0" Name="label1" Height="28" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">+</Label>
    16         <Label Height="28" Margin="12,205,12,0" Name="label2" VerticalAlignment="Top" HorizontalContentAlignment="Center">=</Label>
     19        <TextBlock Margin="8,8,8,0" x:Name="textBlock1" Text="We have finished with the last round of the compression. Now it's time to update our accumulators. We do this by simply adding the variables A - D to them." TextWrapping="Wrap" Height="65" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" />
     20        <displays:HashAccumulatorDisplay DataContext="{Binding LastState}" Height="70" Margin="8,87,8,0" VerticalAlignment="Top" />
     21        <displays:CompressionVariableDisplay DataContext="{Binding LastState}" Margin="8,189,8,0" VerticalAlignment="Top" Height="70" />
     22        <displays:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Height="70" Margin="8,295,8,0" VerticalAlignment="Top">
     23                <displays:HashAccumulatorDisplay.Effect>
     24                        <BlurEffect/>
     25                </displays:HashAccumulatorDisplay.Effect>
     26        </displays:HashAccumulatorDisplay>
     27        <TextBlock Margin="8,157,0,0" x:Name="label1" Style="{DynamicResource textBlockStyle}" HorizontalAlignment="Left" Text="+" TextAlignment="Center" Width="784" VerticalAlignment="Top" Height="28"/>
     28        <TextBlock Margin="8,0,8,110" x:Name="label2" Style="{DynamicResource textBlockStyle}" VerticalAlignment="Bottom" Height="28" Text="=" TextAlignment="Center"/>
    1729    </Grid>
    1830</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/InitializedPresentation.xaml

    r897 r936  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays" Height="306" Width="994">
    5     <Grid>
    6         <displays:HashAccumulatorDisplay Margin="8,106,8,0" DataContext="{Binding CurrentState}" Height="90" VerticalAlignment="Top" />
    7         <TextBlock Margin="8,250,8,0" Name="label1" Height="44" VerticalAlignment="Top" Text="The first thing we do is initialize our accumulators to their starting values, which are the fixed constants that you can see above." TextWrapping="Wrap" />
    8         <TextBlock Height="64" Margin="12,12,12,0" Name="label2" VerticalAlignment="Top" TextWrapping="Wrap" Text="The variables H1 - H4 are our accumulator variables. While we perform the hash, we will change them after each execution of the compression function. When we are done, they contain the final MD5 hash value." />
    9     </Grid>
     4    xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays" Height="400" Width="800">
     5        <UserControl.Resources>
     6                <ResourceDictionary>
     7                        <ResourceDictionary.MergedDictionaries>
     8                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     9                        </ResourceDictionary.MergedDictionaries>
     10                </ResourceDictionary>
     11        </UserControl.Resources>
     12                <Grid>
     13                        <displays:HashAccumulatorDisplay Margin="8,144,8,0" DataContext="{Binding CurrentState}" VerticalAlignment="Top" Height="86"/>
     14                        <TextBlock Margin="8,0,8,8" Text="The first thing we do is initialize our accumulators to their starting values, which are the fixed constants that you can see above." Height="80" VerticalAlignment="Bottom" Style="{DynamicResource textBlockStyle}"/>
     15                        <TextBlock Height="98" Margin="8,8,8,0" VerticalAlignment="Top" Text="The variables H1 - H4 are our accumulator variables. While we perform the hash, we will change them after each execution of the compression function. When we are done, they contain the final MD5 hash value." Style="{DynamicResource textBlockStyle}"/>
     16                </Grid>
    1017</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/ReadDataPresentation.xaml

    r897 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.ReadDataPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="244" Width="494"
    4     xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays">
     3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4    xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.ReadDataPresentation"
     5    Height="400" Width="800"
     6    mc:Ignorable="d">
     7        <UserControl.Resources>
     8                <ResourceDictionary>
     9                        <ResourceDictionary.MergedDictionaries>
     10                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     11                        </ResourceDictionary.MergedDictionaries>
     12                </ResourceDictionary>
     13        </UserControl.Resources>
    514    <Grid>
    6         <TextBlock Height="28" Margin="12,12,12,0" Name="label1" VerticalAlignment="Top">We have read a total of</TextBlock>
    7         <Label Height="40" Margin="12,46,12,0" Name="label2" VerticalAlignment="Top" Content="{Binding CurrentState.DataLength}" FontSize="18" />
    8         <TextBlock Margin="12,92,12,0" Name="label3" Height="28" VerticalAlignment="Top">bytes of data.</TextBlock>
    9         <TextBlock Margin="12,126,12,0" Name="label4" Height="28" VerticalAlignment="Top">The data block we have read looks like this:</TextBlock>
    10         <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Margin="12,160,12,0" Height="60" VerticalAlignment="Top" />
     15        <TextBlock Height="29.037" Margin="8,56.444,8,0" x:Name="label1" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" HorizontalAlignment="Center"><Run Text="We have read a total of"/></TextBlock>
     16        <Label Height="41.482" Margin="8,89.481,8,0" x:Name="label2" VerticalAlignment="Top" Content="{Binding CurrentState.DataLength}" FontSize="18" HorizontalContentAlignment="Center" />
     17        <TextBlock Margin="8,134.963,8,0" x:Name="label3" Style="{DynamicResource textBlockStyle}" HorizontalAlignment="Center" VerticalAlignment="Top" Height="29.037"><Run Text="bytes of data."/></TextBlock>
     18        <TextBlock Margin="8,0,8,166" x:Name="label4" Height="28" VerticalAlignment="Bottom" HorizontalAlignment="Center" Style="{DynamicResource textBlockStyle}"><Run Text="The data block we have read looks like this:"/></TextBlock>
     19        <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Margin="8,238,8,0" Height="108" VerticalAlignment="Top" />
    1120    </Grid>
    1221</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/ReadingDataPresentation.xaml

    r897 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.ReadingDataPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="263" Width="428">
    4     <Grid>
    5         <TextBlock Margin="12,12,12,0" Name="textBox1" TextWrapping="Wrap" Text="We continue by reading the next block of data." Height="43" VerticalAlignment="Top" />
    6         <TextBlock Height="23" Margin="12,61,12,0" Name="textBlock1" Text="So far, we have processed" TextWrapping="Wrap" VerticalAlignment="Top" />
    7         <Label Height="40" Margin="12,90,12,0" Name="label1" VerticalAlignment="Top" Content="{Binding CurrentState.BytesHashed}" FontSize="18" />
    8         <TextBlock Margin="12,136,12,0" Name="textBlock2" Text="bytes of data." TextWrapping="Wrap" Height="23" VerticalAlignment="Top" />
    9         <TextBlock Height="89" Margin="12,165,12,0" Name="textBlock3" Text="The compression function of MD5 processes data in blocks of 64 bytes. Our goal is to so much data that we can immediately call the compression function afterwards. Thus, we continue reading as many bytes as possible until we have 64." TextWrapping="Wrap" VerticalAlignment="Top" />
    10     </Grid>
     3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.ReadingDataPresentation"
     4    Height="400" Width="800" mc:Ignorable="d">
     5        <UserControl.Resources>
     6                <ResourceDictionary>
     7                        <ResourceDictionary.MergedDictionaries>
     8                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     9                        </ResourceDictionary.MergedDictionaries>
     10                </ResourceDictionary>
     11        </UserControl.Resources>
     12        <Grid>
     13                <TextBlock Margin="8,12,8,0" x:Name="textBox1" TextWrapping="Wrap" Height="43" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" ><Run Text="We continue by reading the next block of data."/></TextBlock>
     14                <TextBlock Height="35" Margin="8,97,8,0" x:Name="textBlock1" Text="So far, we have processed" TextWrapping="Wrap" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" RenderTransformOrigin="0.5,0.5" />
     15                <Label Margin="389,136,0,0" x:Name="label1" Content="{Binding CurrentState.BytesHashed}" FontSize="18" Style="{DynamicResource labelStyle}" VerticalAlignment="Top" Height="40" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" />
     16                <TextBlock Margin="8,0,8,181" x:Name="textBlock2" Text="bytes of data." TextWrapping="Wrap" Height="39" VerticalAlignment="Bottom" Style="{DynamicResource textBlockStyle}" RenderTransformOrigin="0.5,0.5" />
     17                <TextBlock Height="95" Margin="8,0,8,8" x:Name="textBlock3" TextWrapping="Wrap" VerticalAlignment="Bottom" Style="{DynamicResource textBlockStyle}" ><Run Text="The compression function of MD5 processes data in blocks of 64 bytes. Our goal is to "/><Run Text="read enough "/><Run Text="data that we can immediately call the compression function afterwards. Thus, we continue reading as many bytes as possible until we have 64."/></TextBlock>
     18        </Grid>
    1119</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/StartingCompressionPresentation.xaml

    r897 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.StartingCompressionPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    44    xmlns:displays="clr-namespace:Cryptool.MD5.Presentation.Displays"
    5     Height="360" Width="628">
     5    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.StartingCompressionPresentation"
     6    Height="400" Width="800" mc:Ignorable="d">
     7        <UserControl.Resources>
     8                <ResourceDictionary>
     9                        <ResourceDictionary.MergedDictionaries>
     10                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     11                        </ResourceDictionary.MergedDictionaries>
     12                </ResourceDictionary>
     13        </UserControl.Resources>
    614    <Grid>
    7         <TextBlock Height="21" Margin="12,12,12,0" Name="textBlock1" VerticalAlignment="Top" Text="We now start the compression function for our next data block," />
    8         <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Height="38" Margin="12,39,12,0" VerticalAlignment="Top" />
    9         <TextBlock Height="43" Margin="12,83,12,0" Name="textBlock2" Text="The compression function operates on 32 bit integers. There are 4 temporary variables A, B, C and D, which are permutated during the compression. They are initialized with the values from H1 - H4." VerticalAlignment="Top" TextWrapping="Wrap" />
    10         <displays:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Margin="12,132,0,0" Height="34" HorizontalAlignment="Left" VerticalAlignment="Top" Width="272" />
    11         <displays:CompressionVariableDisplay DataContext="{Binding CurrentState}" Margin="0,132,12,0" Height="34" HorizontalAlignment="Right" VerticalAlignment="Top" Width="272" />
    12         <Label Margin="290,132,290,0" Name="label1" Height="34" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">>>></Label>
     15        <TextBlock Height="33" Margin="8,8,8,0" x:Name="textBlock1" VerticalAlignment="Top" Text="We now start the compression function for our next data block," Style="{DynamicResource textBlockStyle}" />
     16        <displays:DataBlockDisplay Data="{Binding CurrentState.CurrentDataBlock}" Height="30" Margin="8,45,8,0" VerticalAlignment="Top" />
     17        <TextBlock Margin="8,79,8,0" x:Name="textBlock2" TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}" VerticalAlignment="Top" Height="85" ><Run Text="The compression function operates on 32 bit integers. There are 4 temporary variables A, B, C and D, which are "/><Run Text="used "/><Run Text="during the compression. "/><Run Text="We initialize them "/><Run Text="with the values from H1 - H4"/><Run Text=":"/></TextBlock>
     18        <displays:HashAccumulatorDisplay DataContext="{Binding CurrentState}" Margin="8,180,0,175" HorizontalAlignment="Left" Width="350" />
     19        <displays:CompressionVariableDisplay DataContext="{Binding NextState}" Margin="0,180,8,175" HorizontalAlignment="Right" Width="350" />
     20        <Label Margin="364,180,356,175" x:Name="label1" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Style="{DynamicResource labelStyle}" Content="&gt;&gt;&gt;"/>
     21        <TextBlock Margin="8,0,8,98.7" x:Name="textBlock2_Copy" TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}" VerticalAlignment="Bottom" Height="35" ><Run Text="We also split our "/><Run Text="512 bit "/><Run Text="data block into 16 "/><Run Text="little-endian "/><Run Text="integers"/><Run Text=", each "/><Run Text="32 bit:"/></TextBlock>
     22        <displays:DataIntegerDisplay Margin="8,0,8,8" VerticalAlignment="Bottom" Height="86.7" DataContext="{Binding NextState.DataAsIntegers}"/>
    1323    </Grid>
    1424</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/StartingPaddingPresentation.xaml

    r897 r936  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="361" Width="576">
     4    Height="361" Width="800">
     5        <UserControl.Resources>
     6                <ResourceDictionary>
     7                        <ResourceDictionary.MergedDictionaries>
     8                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     9                        </ResourceDictionary.MergedDictionaries>
     10                </ResourceDictionary>
     11        </UserControl.Resources>
    512    <Grid>
    6         <TextBlock Height="28" Margin="12,67,12,0" Name="label1" VerticalAlignment="Top">Since we read only</TextBlock>
    7         <Label Height="40" Margin="12,101,12,0" Name="label2" VerticalAlignment="Top" Content="{Binding CurrentState.DataLength}" FontSize="18" />
    8         <TextBlock Height="28" Margin="12,147,12,0" Name="label3" VerticalAlignment="Top" TextWrapping="Wrap" Text="bytes in the previous step, we conclude that we reached the end of our data."></TextBlock>
    9         <TextBlock Margin="12,0,12,76" TextWrapping="Wrap" Height="104" VerticalAlignment="Bottom">We can now begin the padding process. Padding has two uses: First, it gives us the opportunity to manipulate our data until we again have blocks with length of a multiple of 64 bytes. Secondly, it allows us to work the length of the data into the final hash value.</TextBlock>
     13        <TextBlock Height="28" Margin="8,8,8,0" x:Name="label1" VerticalAlignment="Top" Style="{DynamicResource textBlockStyle}" Text="Since we read only" TextAlignment="Center"/>
     14        <Label Height="40" Margin="8,40,8,0" Name="label2" VerticalAlignment="Top" Content="{Binding CurrentState.DataLength}" FontSize="18" Style="{DynamicResource labelStyle}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
     15        <TextBlock Height="28" Margin="8,84,8,0" Name="label3" VerticalAlignment="Top" TextWrapping="Wrap" Text="bytes in the previous step, we conclude that we reached the end of our data." Style="{DynamicResource textBlockStyle}" TextAlignment="Center"></TextBlock>
     16        <TextBlock Margin="8,175,8,8" TextWrapping="Wrap" Style="{DynamicResource textBlockStyle}"><Run Text="We can now begin the padding process"/><Run Text=", which ha"/><Run Text="s two uses:"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="• "/><Run Text="I"/><Run Text="t gives us the opportunity to increase the length of our data until we again have blocks with length of a multiple of 64 bytes."/><LineBreak/><Run Text=""/><LineBreak/><Run Text="• "/><Run Text="I"/><Run Text="t allows us to work the "/><Run Text="total "/><Run Text="length of the data into the final hash value."/></TextBlock>
    1017    </Grid>
    1118</UserControl>
  • trunk/CrypPlugins/MD5/Presentation/States/StartingRoundPresentation.xaml

    r895 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.StartingRoundPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="300">
     4    xmlns:Cryptool_MD5_Presentation_Displays="clr-namespace:Cryptool.MD5.Presentation.Displays" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.StartingRoundPresentation"
     5    Height="400" Width="800" mc:Ignorable="d">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    513    <Grid>
     14           
     15        <Cryptool_MD5_Presentation_Displays:RoundAndStepDisplay VerticalAlignment="Top" HorizontalAlignment="Right" Height="46.373" DataContext="{Binding CurrentState}"/>
     16        <TextBlock Margin="8,62,0,0" Style="{StaticResource textBlockStyle}" VerticalAlignment="Top" Text="We are now starting round" HorizontalAlignment="Left" Width="262" Height="38.373"/>
     17        <TextBlock Margin="274,62,0,0" Style="{StaticResource textBlockStyle}" VerticalAlignment="Top" Text="{Binding CurrentState.Round}" Height="38.373" HorizontalAlignment="Left" Width="36"/>
     18        <TextBlock Margin="314,62,302,0" Style="{StaticResource textBlockStyle}" VerticalAlignment="Top" Text="of 4."/>
     19        <TextBlock Margin="8,104.373,8,0" Style="{StaticResource textBlockStyle}" VerticalAlignment="Top" Height="30.373"><Run Text="Each round has 16 steps which change "/><Run Text="our "/><Run Text="temporary variables "/><Run Text="A - D"/><Run Text="."/></TextBlock>
     20        <TextBlock Margin="8,168.746,8,144.881" Style="{StaticResource textBlockStyle}"><Run Text="There are 4 non-linear inner round functions"/><Run Text=" called"/><Run Text=" F, G, H and I."/><Run Text=" They "/><Run Text="are a central part of the calculations performed in each round step. In this round, we use the function"/></TextBlock>
     21        <Cryptool_MD5_Presentation_Displays:FunctionNameDisplay Margin="314,0,320,104.881" VerticalAlignment="Bottom" Height="36" FunctionName="{Binding CurrentState.RoundFunctionName}"/>
    622           
    723    </Grid>
  • trunk/CrypPlugins/MD5/Presentation/States/StartingRoundStepPresentation.xaml

    r895 r936  
    1 <UserControl x:Class="Cryptool.MD5.Presentation.States.StartingRoundStepPresentation"
     1<UserControl
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4     Height="300" Width="300">
     4    xmlns:Cryptool_MD5_Presentation_Displays="clr-namespace:Cryptool.MD5.Presentation.Displays" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Cryptool.MD5.Presentation.States.StartingRoundStepPresentation"
     5    Height="400" Width="800" mc:Ignorable="d">
     6        <UserControl.Resources>
     7                <ResourceDictionary>
     8                        <ResourceDictionary.MergedDictionaries>
     9                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     10                        </ResourceDictionary.MergedDictionaries>
     11                </ResourceDictionary>
     12        </UserControl.Resources>
    513    <Grid>
     14           
     15        <Cryptool_MD5_Presentation_Displays:RoundAndStepDisplay VerticalAlignment="Top" HorizontalAlignment="Left" DataContext="{Binding CurrentState}" Margin="8,8,0,0"/>
     16        <Cryptool_MD5_Presentation_Displays:CompressionVariableDisplay Margin="332,8,8,0" VerticalAlignment="Top" Height="50" Width="460"/>
     17        <Cryptool_MD5_Presentation_Displays:FunctionNameDisplay HorizontalAlignment="Right" Margin="0,112,325,0" Width="56" VerticalAlignment="Top" Height="44" FunctionName="{Binding CurrentState.RoundFunctionName}"/>
     18        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="74,62,0,0" VerticalAlignment="Top" Width="1" Height="1" Data="M74,62"/>
     19        <UniformGrid Margin="332,0,8,8" VerticalAlignment="Bottom" Height="40" Rows="1" Columns="4" Width="460">
     20                <Label Style="{StaticResource labelStyle}" VerticalAlignment="Bottom" Content="B" Background="White" BorderBrush="Black" BorderThickness="1" HorizontalContentAlignment="Center">
     21                <Label.Effect>
     22                        <DropShadowEffect/>
     23                </Label.Effect>
     24        </Label>
     25                                <Label Style="{StaticResource labelStyle}" VerticalAlignment="Bottom" Content="C" Background="White" BorderBrush="Black" BorderThickness="1" HorizontalContentAlignment="Center">
     26                <Label.Effect>
     27                        <DropShadowEffect/>
     28                </Label.Effect>
     29        </Label>
     30                                <Label Style="{StaticResource labelStyle}" VerticalAlignment="Bottom" Content="D" Background="White" BorderBrush="Black" BorderThickness="1" HorizontalContentAlignment="Center">
     31                <Label.Effect>
     32                        <DropShadowEffect/>
     33                </Label.Effect>
     34        </Label>
     35                                <Label Style="{StaticResource labelStyle}" VerticalAlignment="Bottom" Content="A" Background="White" BorderBrush="Black" BorderThickness="1" HorizontalContentAlignment="Center">
     36                <Label.Effect>
     37                        <DropShadowEffect/>
     38                </Label.Effect>
     39        </Label>
     40                </UniformGrid>
     41        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Right" Margin="0,62,65,47.5" Width="1" Data="M740,62 L740,351.5"/>
     42        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Right" Margin="0,60,181,47.5" Width="1" Data="M618,60 L618,351.5"/>
     43        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Right" Margin="0,62,293,47.5" Width="1" Data="M506,62 L506,351.5"/>
     44        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Right" Margin="0,61.5,291.5,0" VerticalAlignment="Top" Width="62.5" Height="51.5" Data="M446,112 L507.5,61.5"/>
     45        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Right" Margin="0,60,181,0" VerticalAlignment="Top" Width="169.5" Height="52.5" Data="M618,60 L449.5,111.5"/>
     46        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Right" Margin="0,60,65,0" VerticalAlignment="Top" Width="283.5" Height="52.5" Data="M734,60 L451.5,111.5"/>
     47        <Label Margin="360.5,114,0,0" VerticalAlignment="Top" Height="35" Content="+" Style="{DynamicResource labelStyle}" BorderThickness="1" BorderBrush="Black" HorizontalContentAlignment="Center" Template="{DynamicResource functionLabelStyle}" HorizontalAlignment="Left" Width="30" FontSize="16">
     48                <Label.Background>
     49                        <SolidColorBrush Color="White"/>
     50                </Label.Background>
     51                <Label.Effect>
     52                        <DropShadowEffect/>
     53                </Label.Effect>
     54        </Label>
     55        <Path Fill="White" Stretch="Fill" Stroke="Black" Margin="375,58,0,0" VerticalAlignment="Top" Height="55" Data="M375,58 L375,149.5" HorizontalAlignment="Left" Width="1"/>
     56        <Cryptool_MD5_Presentation_Displays:DataIntegerDisplay Margin="8,103,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="298" Height="46"/>
     57        <Path Fill="White" Stretch="Fill" Stroke="Black" Margin="390.5,134,379,0" VerticalAlignment="Top" Height="1" Data="M420,134 L397.5,134"/>
     58        <Label Background="White" HorizontalAlignment="Left" Margin="360.5,162,0,0" Style="{DynamicResource labelStyle}" Width="30" Content="+" BorderBrush="Black" BorderThickness="1" FontSize="16" HorizontalContentAlignment="Center" Template="{DynamicResource functionLabelStyle}" VerticalAlignment="Top" Height="35">
     59                <Label.Effect>
     60                        <DropShadowEffect/>
     61                </Label.Effect>
     62        </Label>
     63        <Label Background="White" Margin="344.5,0,393.5,106" Style="{DynamicResource labelStyle}" VerticalAlignment="Bottom" Height="35" Content="&lt;&lt;&lt;" BorderBrush="Black" BorderThickness="1" FontSize="16" HorizontalContentAlignment="Center" Template="{DynamicResource functionLabelStyle}">
     64                <Label.Effect>
     65                        <DropShadowEffect/>
     66                </Label.Effect>
     67        </Label>
     68        <Label Background="White" HorizontalAlignment="Left" Margin="360.5,0,0,155" Style="{DynamicResource labelStyle}" VerticalAlignment="Bottom" Width="30" Height="35" Content="+" BorderBrush="Black" BorderThickness="1" FontSize="16" HorizontalContentAlignment="Center" Template="{DynamicResource functionLabelStyle}">
     69                <Label.Effect>
     70                        <DropShadowEffect/>
     71                </Label.Effect>
     72        </Label>
     73        <Label Background="White" HorizontalAlignment="Left" Margin="360.5,0,0,57" Style="{DynamicResource labelStyle}" VerticalAlignment="Bottom" Width="30" Height="35" Content="+" BorderBrush="Black" BorderThickness="1" FontSize="16" HorizontalContentAlignment="Center" Template="{DynamicResource functionLabelStyle}">
     74                <Label.Effect>
     75                        <DropShadowEffect/>
     76                </Label.Effect>
     77        </Label>
     78        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="375,150,0,0" VerticalAlignment="Top" Width="1" Height="12.5" Data="M375,150 L375,161.5"/>
     79        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="376,197,0,189.5" Width="1" Data="M376,200 L376,209.5"/>
     80        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="376,0,0,139.5" VerticalAlignment="Bottom" Width="1" Height="14.5" Data="M376,246 L376,259.5"/>
     81        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="376,0,0,92" VerticalAlignment="Bottom" Width="1" Height="14" Data="M376,246 L376,259.5"/>
     82        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="376,0,0,47.5" VerticalAlignment="Bottom" Width="1" Height="9.5" Data="M376,246 L376,259.5"/>
     83        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="306,126,0,0" VerticalAlignment="Top" Width="54.5" Height="50.5" Data="M306,126 L359.5,129.5"/>
     84        <Label HorizontalAlignment="Left" Margin="32.413,197,0,177.04" Content="(Addition constant)" Template="{StaticResource functionLabelStyle}" d:LayoutOverrides="Height"/>
     85        <Label HorizontalAlignment="Left" Margin="44,0,0,128.04" Content="(Shift value)" Template="{StaticResource functionLabelStyle}" VerticalAlignment="Bottom"/>
     86        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="148,0,0,169.5" VerticalAlignment="Bottom" Width="212.5" Height="16.5" Data="M148,214 L343.5,229.5"/>
     87        <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" Margin="128,0,0,123.5" VerticalAlignment="Bottom" Width="216.5" Height="14.5" Data="M128,262 L343.5,275.5"/>
     88        <Path Fill="White" Stretch="Fill" Stroke="Black" Margin="392,0,293.5,75" VerticalAlignment="Bottom" Height="55.5" Data="M392,324 L505.5,269.5"/>
     89       
    690           
    791    </Grid>
  • trunk/CrypPlugins/MD5/Presentation/States/UninitializedPresentation.xaml

    r895 r936  
    11<UserControl x:Class="Cryptool.MD5.Presentation.States.UninitializedPresentation"
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="196" Width="758">
     3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="400" Width="800">
     4        <UserControl.Resources>
     5                <ResourceDictionary>
     6                        <ResourceDictionary.MergedDictionaries>
     7                                <ResourceDictionary Source="StyleDictionary.xaml"/>
     8                        </ResourceDictionary.MergedDictionaries>
     9                </ResourceDictionary>
     10        </UserControl.Resources>
    411    <Grid>
    5         <TextBlock Name="label1" TextWrapping="Wrap" Margin="0,68,0,0" Height="74" VerticalAlignment="Top">The algorithm is not yet initialized. Please connect an input stream and start the workspace's process flow. Make sure that the "Presentation Mode" option is selected.</TextBlock>
     12        <TextBlock x:Name="label1" TextWrapping="Wrap" Margin="8,146,8,160" Style="{DynamicResource textBlockStyle}" Text="The algorithm is not yet initialized. Please connect an input stream and start the workspace's process flow. Make sure that the &quot;Presentation Mode&quot; option is selected." TextAlignment="Center"/>
    613    </Grid>
    714</UserControl>
Note: See TracChangeset for help on using the changeset viewer.