Ignore:
Timestamp:
Aug 29, 2010, 10:09:47 PM (11 years ago)
Author:
schomburg
Message:

added english menus
changed GUI a bit
added additional input for bleichenbacher signatures

Location:
trunk/CrypPlugins/PKCS1/WpfControls
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/DatablockControl.xaml

    r1749 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    45     HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    56    <Grid >
     
    910        </Grid.RowDefinitions>
    1011        <!-- Input (Upper Part) -->
    11         <GroupBox Grid.Row="0" Header="Datenblock generieren" Margin="0,0,0,0">
     12        <GroupBox Grid.Row="0" Margin="0,0,0,0">
     13            <GroupBox.Header>
     14                <x:Static Member="lang:DatablockCtrl.genDatablock"></x:Static>
     15            </GroupBox.Header>
    1216            <Grid>
    1317                <Grid.ColumnDefinitions>
     
    2630                        </Grid.RowDefinitions>                       
    2731                            <!-- Text aus Datei laden -->
    28                             <RadioButton Grid.Row="0" Margin="5,5,5,5" Name="rbTextfromFile" VerticalAlignment="Top" HorizontalAlignment="Left" Checked="rbTextfromFile_Checked">Datei laden</RadioButton>
     32                        <RadioButton Grid.Row="0" Margin="5,5,5,5" Name="rbTextfromFile" VerticalAlignment="Top" HorizontalAlignment="Left" Checked="rbTextfromFile_Checked">
     33                            <x:Static Member="lang:DatablockCtrl.fileLoad"></x:Static></RadioButton>
    2934                        <Grid Grid.Row="1">
    3035                            <Grid.ColumnDefinitions>
     
    3338                            </Grid.ColumnDefinitions>
    3439                            <TextBox Grid.Column="0" Height="20" MinWidth="270" Margin="5,0,5,5" IsReadOnly="True" Name="tbInputFile" VerticalAlignment="Top" HorizontalAlignment="Left" />
    35                             <Button Grid.Column="1" Height="20" Margin="5,0,5,5" Name="bOpenFile" VerticalAlignment="Top" HorizontalAlignment="Left" Click="bOpenFile_Click">Datei öffnen</Button>
     40                            <Button Grid.Column="1" Height="20" Margin="5,0,5,5" Name="bOpenFile" VerticalAlignment="Top" HorizontalAlignment="Left" Click="bOpenFile_Click">
     41                                <x:Static Member="lang:DatablockCtrl.fileOpen"></x:Static>
     42                            </Button>
    3643                        </Grid>
    3744                        <!-- Text eingeben -->
    38                             <RadioButton Grid.Row="2" Margin="5,5,5,5" Name="rbTextFromBox" HorizontalAlignment="Left" Checked="rbTextFromBox_Checked">Text eingeben</RadioButton>
    39                             <TextBox Grid.Row="3" MinHeight="85" MaxWidth="400" Margin="5,0,5,5" Name="tbInputText" TextWrapping="Wrap" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">Hier bitte den zu signierenden Text eingeben.</TextBox>
     45                        <RadioButton Grid.Row="2" Margin="5,5,5,5" Name="rbTextFromBox" HorizontalAlignment="Left" Checked="rbTextFromBox_Checked">
     46                            <x:Static Member="lang:DatablockCtrl.textInput"></x:Static>
     47                        </RadioButton>
     48                        <TextBox Grid.Row="3" MinHeight="85" MaxWidth="400" Margin="5,0,5,5" Name="tbInputText" TextWrapping="Wrap" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
     49                            <x:Static Member="lang:DatablockCtrl.textDefault"></x:Static>
     50                        </TextBox>
    4051                     </Grid>
    4152                </Grid>
     
    4960                    </Grid.RowDefinitions>
    5061                        <!-- Choose Hashfunction -->
    51                         <Label Grid.Row="0" HorizontalAlignment="Right" Margin="5,0,5,0" Name="lblChooseHash" VerticalAlignment="Top" Width="125">Hashfunktion wählen</Label>
     62                    <Label Grid.Row="0" HorizontalAlignment="Right" Margin="5,0,5,0" Name="lblChooseHash" VerticalAlignment="Top" Width="125">
     63                        <x:Static Member="lang:DatablockCtrl.chooseHashfunction"></x:Static>
     64                    </Label>
    5265                        <ComboBox Grid.Row="1" Height="20" HorizontalAlignment="Right" Margin="5,0,5,5" Name="cbHashFunc" VerticalAlignment="Top" Width="125" IsEditable="False" SelectionChanged="cbHashFunc_SelectionChanged"/>
    53                         <Button Grid.Row="2" Height="25" HorizontalAlignment="Right" Margin="5,5,5,5" Name="bGenerate" VerticalAlignment="Bottom" MinWidth="110" Click="bGenerate_Click">Datenblock generieren</Button>
     66                    <Button Grid.Row="2" Height="25" HorizontalAlignment="Right" Margin="5,5,5,5" Name="bGenerate" VerticalAlignment="Bottom" MinWidth="110" Click="bGenerate_Click">
     67                        <x:Static Member="lang:DatablockCtrl.genDatablock"></x:Static>
     68                    </Button>
    5469                </Grid>
    5570            </Grid>
     
    5772
    5873        <!-- Result (Lower Part) -->
    59         <GroupBox Grid.Row="1" Header="Generierter Datenblock" Name="groupBox2"  Margin="0,15,0,0" VerticalAlignment="Bottom">
     74        <GroupBox Grid.Row="1" Name="groupBox2"  Margin="0,15,0,0" VerticalAlignment="Bottom">
     75            <GroupBox.Header>
     76                <x:Static Member="lang:DatablockCtrl.generatedDatablock"></x:Static>
     77            </GroupBox.Header>
    6078            <Grid Name="grid2">
    6179                <Grid.RowDefinitions>
     
    6684                    <RowDefinition Height="*" />
    6785                </Grid.RowDefinitions>
    68                     <Label Grid.Row="0" Margin="0,5,0,0" Name="lblHashIdent">Hashfunktion Identifier</Label>
     86                <Label Grid.Row="0" Margin="0,5,0,0" Name="lblHashIdent">
     87                    <x:Static Member="lang:DatablockCtrl.hi"></x:Static>
     88                </Label>
    6989                    <Label Grid.Row="0" Margin="150,5,0,0" Name="lblHashIdentLength"></Label>
    70                     <TextBox Grid.Row="1" Height="35" Margin="5,0,5,0" Name="tbHashIdent" IsReadOnly="True" TextWrapping="Wrap" MaxWidth="450" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" TextChanged="tbHashIdent_TextChanged"/>               
    71                     <Label Grid.Row="2" Margin="0,5,0,0" Name="lblHashDigest">Hashwert</Label>
     90                    <TextBox Grid.Row="1" Height="35" Margin="5,0,5,0" Name="tbHashIdent" IsReadOnly="True" TextWrapping="Wrap" MaxWidth="450" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" TextChanged="tbHashIdent_TextChanged"/>
     91                <Label Grid.Row="2" Margin="0,5,0,0" Name="lblHashDigest">
     92                    <x:Static Member="lang:DatablockCtrl.hd"></x:Static>
     93                </Label>
    7294                    <Label Grid.Row="2" Margin="150,5,0,0" Name="lblHashDigestLength"></Label>
    7395                    <TextBox Grid.Row="3" Height="35" Margin="5,0,5,0" Name="tbHashDigest" IsReadOnly="True" TextWrapping="Wrap" MaxWidth="450" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" TextChanged="tbHashDigest_TextChanged"/>               
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/DatablockControl.xaml.cs

    r1778 r1885  
    1515using System.Security.Cryptography;
    1616using System.IO;
    17 using PKCS1;
    1817using PKCS1.Library;
     18using PKCS1.Resources.lang.Gui;
    1919using Microsoft.Win32;
    2020
     
    106106            else
    107107            {
    108                 byteToHash = Encoding.ASCII.GetBytes("Fehler!");
     108                byteToHash = Encoding.ASCII.GetBytes("Error!");
    109109            }
    110110
     
    118118            if(this.tbHashIdent.Text != String.Empty )
    119119            {
    120                 this.lblHashIdentLength.Content = "(Länge: "+ this.tbHashIdent.Text.Length*4 +" bit)";
     120                this.lblHashIdentLength.Content = "(" + DatablockCtrl.length +" "+ this.tbHashIdent.Text.Length*4 + " " + Common.bit + ")";
    121121            }
    122122        }
     
    126126            if (this.tbHashDigest.Text != String.Empty)
    127127            {
    128                 this.lblHashDigestLength.Content = "(Länge: " + this.tbHashDigest.Text.Length*4 + " bit)";
     128                this.lblHashDigestLength.Content = "(" + DatablockCtrl.length + " " + this.tbHashDigest.Text.Length * 4 + " " + Common.bit + ")";
    129129            }
    130130        }
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenBleichenbControl.xaml

    r1742 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4    xmlns:lib="clr-namespace:PKCS1.Library"
     5    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    46    VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
     7    <UserControl.Resources>
     8       
     9    </UserControl.Resources>
    510    <Grid>
    611        <Grid.RowDefinitions>
     
    914        </Grid.RowDefinitions>
    1015        <!-- Generate Signature -->
    11         <GroupBox Header="Signatur generieren" Name="gbSigGen" Grid.Row="0">
     16        <GroupBox Name="gbSigGen" Grid.Row="0">
     17            <GroupBox.Header>
     18                <x:Static Member="lang:SigGenBleichenbCtrl.genSig"></x:Static>
     19            </GroupBox.Header>
    1220            <Grid>
    1321                <Grid.ColumnDefinitions>
     
    2230                        <RowDefinition Height="auto" />
    2331                        <RowDefinition Height="auto" />
     32                        <RowDefinition Height="auto" />
    2433                    </Grid.RowDefinitions>
    25                     <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">RSA-Schlüsselgröße (in Bit):</Label>
    26                     <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Öffentlicher Schlüssel:</Label>
    27                     <Label Grid.Row="2" Name="lblDataBlockPos" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Bitposition des Datenblocks:</Label>
     34                    <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     35                        <x:Static Member="lang:SigGenBleichenbCtrl.rsaKeySize"></x:Static></Label>
     36                    <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     37                        <x:Static Member="lang:SigGenBleichenbCtrl.pubKey"></x:Static></Label>
     38                    <Label Grid.Row="2" Name="lblDataBlockPos" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     39                        <x:Static Member="lang:SigGenBleichenbCtrl.bitPos"></x:Static></Label>
     40                    <Label Grid.Row="3" Name="lblChangeSign" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     41                        <x:Static Member="lang:SigGenBleichenbCtrl.changeSign"></x:Static>
     42                    </Label>
    2843                </Grid>
    2944                <!-- middle -->
     
    3348                        <RowDefinition Height="auto" />
    3449                        <RowDefinition Height="auto" />
     50                        <RowDefinition Height="auto" />
    3551                    </Grid.RowDefinitions>
    3652                    <Label Grid.Row="0" Name="lblRsaKeySizeRes" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="150"></Label>
    3753                    <Label Grid.Row="1" Name="lblPublicKeyRes" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="150"></Label>
    38                     <ComboBox Grid.Row="2" Name="cbPosDataBlock" IsEditable="False" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="150" SelectionChanged="cbPosDataBlock_SelectionChanged"></ComboBox>
     54                    <ComboBox Grid.Row="2" Name="cbPosDataBlock" IsEditable="False" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="150"></ComboBox>
     55                    <TextBox Grid.Row="3" Name="tbChangeSign" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="100" MaxLength="2">_</TextBox>
    3956                </Grid>
    4057                <!-- right -->
     
    4461                        <RowDefinition Height="*" />                       
    4562                    </Grid.RowDefinitions>
    46                     <GroupBox Grid.Row="0" Header="Struktur" Name="gbStruct" Height="47" Width="200" HorizontalAlignment="Right" VerticalAlignment="Top">
     63                    <GroupBox Grid.Row="0" Name="gbStruct" Height="47" Width="200" HorizontalAlignment="Right" VerticalAlignment="Top">
     64                        <GroupBox.Header>
     65                            <x:Static Member="lang:SigGenBleichenbCtrl.structure"></x:Static>
     66                        </GroupBox.Header>
    4767                        <Grid>
    4868                            <Grid.ColumnDefinitions>
     
    6080                            <Label Grid.Column="3">'00'</Label>
    6181                            <Label Grid.Column="4" Foreground="Blue">HI</Label>
    62                             <Label Grid.Column="5" Foreground="Red">HW</Label>
     82                            <Label Grid.Column="5" Foreground="Red">HD</Label>
    6383                            <Label Grid.Column="6">GG</Label>
    6484                        </Grid>
    6585                    </GroupBox>
    66                     <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">Gefälschte Signatur generieren</Button>
     86                    <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">
     87                        <x:Static Member="lang:SigGenBleichenbCtrl.genFakeSig"></x:Static></Button>
    6788                </Grid>
    6889            </Grid>
     
    7091
    7192        <!-- Result -->
    72         <GroupBox Header="Generierte Signatur" Name="gbSigRes" Grid.Row="1" Margin="0,15,0,0">
     93        <GroupBox Name="gbSigRes" Grid.Row="1" Margin="0,15,0,0">
     94            <GroupBox.Header>
     95                <x:Static Member="lang:SigGenBleichenbCtrl.generatedSig"></x:Static>
     96            </GroupBox.Header>
    7397            <Grid>
    7498                <Grid.RowDefinitions >
     
    78102                    <RowDefinition Height="*" />
    79103                </Grid.RowDefinitions>
    80                 <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">Unverschlüsselt</Label>
     104                <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">
     105                    <x:Static Member="lang:SigGenBleichenbCtrl.decrypted"></x:Static></Label>
    81106                <Label Grid.Row="0" Margin="150,0,0,0" Name="lblSignatureLength"></Label>
    82107                <RichTextBox Grid.Row="1" Name="rtbResult" MaxWidth="450" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextChanged="rtbResult_TextChanged"></RichTextBox>
    83                 <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">Verschlüsselt</Label>
     108                <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">
     109                    <x:Static Member="lang:SigGenBleichenbCtrl.encrypted"></x:Static></Label>
    84110                <Label Grid.Row="2" Margin="150,0,0,0" Name="lblEncryptedSignatureLength"></Label>
    85111                <TextBox Grid.Row="3" Name="tbResultEncrypted" TextWrapping="Wrap" MaxWidth="450" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextChanged="tbResultEncrypted_TextChanged"></TextBox>
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenBleichenbControl.xaml.cs

    r1778 r1885  
    1313using System.Windows.Shapes;
    1414using PKCS1.Library;
     15using PKCS1.Resources.lang.Gui;
    1516
    1617namespace PKCS1.WpfControls.Components
     
    2223    {
    2324        private BleichenbacherSig m_BleichSignature = new BleichenbacherSig();
    24         //private int DataBlockPos = 0;
    2525
    2626        public SigGenBleichenbControl()
     
    4545            this.m_BleichSignature = (BleichenbacherSig) SignatureHandler.getInstance().getBleichenbSig();
    4646            this.m_BleichSignature.DataBlockStartPos = (int)this.cbPosDataBlock.SelectedValue;
     47            this.m_BleichSignature.ChangeSign = this.tbChangeSign.Text;
    4748
    4849            this.m_BleichSignature.GenerateSignature();
     
    7172        private void rtbResult_TextChanged(object sender, TextChangedEventArgs e)
    7273        {
    73             this.lblSignatureLength.Content = "(Länge: " + UserControlHelper.GetRtbTextLength(this.rtbResult) * 4 + " bit)";
     74            this.lblSignatureLength.Content = "(" + Common.length  +": " + UserControlHelper.GetRtbTextLength(this.rtbResult) * 4 + " " + Common.bit + ")";
    7475        }
    7576
    7677        private void tbResultEncrypted_TextChanged(object sender, TextChangedEventArgs e)
    7778        {
    78             this.lblEncryptedSignatureLength.Content = "(Länge: " + this.tbResultEncrypted.Text.Length * 4 + " bit)";
    79         }
    80 
    81         private void cbPosDataBlock_SelectionChanged(object sender, SelectionChangedEventArgs e)
    82         {
    83 
     79            this.lblEncryptedSignatureLength.Content = "(" + Common.length + ": " + this.tbResultEncrypted.Text.Length * 4 + " " + Common.bit + ")";
    8480        }
    8581    }
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenControl.xaml

    r1742 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    45    HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    56    <Grid>
     
    910        </Grid.RowDefinitions>
    1011        <!-- Generate Signature -->
    11         <GroupBox Header="Signatur generieren" Name="gbSigGen" Grid.Row="0">
     12        <GroupBox Name="gbSigGen" Grid.Row="0">
     13            <GroupBox.Header>
     14                <x:Static Member="lang:SigGenRsaCtrl.genSig"></x:Static>
     15            </GroupBox.Header>
    1216            <Grid>
    1317                <Grid.ColumnDefinitions>
     
    2327                        <RowDefinition Height="*" />
    2428                    </Grid.RowDefinitions>
    25                     <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">RSA-Schlüsselgröße (in Bit):</Label>                   
    26                     <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Öffentlicher Schlüssel: </Label>
     29                    <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     30                        <x:Static Member="lang:SigGenKuehnCtrl.rsaKeySize"></x:Static></Label>
     31                    <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     32                        <x:Static Member="lang:SigGenKuehnCtrl.pubKey"></x:Static></Label>
    2733                   
    2834                </Grid>
     
    4450                    </Grid.RowDefinitions>
    4551                   
    46                     <GroupBox Grid.Row="0" Header="Struktur" Name="gbStruct" Height="47" Width="175" HorizontalAlignment="Right" VerticalAlignment="Top">
     52                    <GroupBox Grid.Row="0" Name="gbStruct" Height="47" Width="175" HorizontalAlignment="Right" VerticalAlignment="Top">
     53                        <GroupBox.Header>
     54                            <x:Static Member="lang:SigGenKuehnCtrl.structure"></x:Static>
     55                        </GroupBox.Header>
    4756                        <Grid>
    4857                            <Grid.ColumnDefinitions>
     
    5968                            <Label Grid.Column="3">'00'</Label>
    6069                            <Label Grid.Column="4" Foreground="Blue">HI</Label>
    61                             <Label Grid.Column="5" Foreground="Red">HW</Label>
     70                            <Label Grid.Column="5" Foreground="Red">HD</Label>
    6271                        </Grid>
    6372                    </GroupBox>
    64                     <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">Signatur generieren</Button>
     73                    <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">
     74                        <x:Static Member="lang:SigGenKuehnCtrl.genSig"></x:Static>
     75                    </Button>
    6576                </Grid>
    6677            </Grid>
     
    6879       
    6980        <!-- Result -->
    70         <GroupBox Header="Generierte Signatur" Name="gbSigRes" Grid.Row="1" Margin="0,15,0,0">
     81        <GroupBox Name="gbSigRes" Grid.Row="1" Margin="0,15,0,0">
     82            <GroupBox.Header>
     83                <x:Static Member="lang:SigGenKuehnCtrl.generatedSig"></x:Static>
     84            </GroupBox.Header>
    7185            <Grid>
    7286                <Grid.RowDefinitions >
     
    7589                    <RowDefinition Height="auto" />
    7690                    <RowDefinition Height="*" />
    77                 </Grid.RowDefinitions>               
    78                 <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">Unverschlüsselt</Label>
     91                </Grid.RowDefinitions>
     92                <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">
     93                    <x:Static Member="lang:SigGenKuehnCtrl.decrypted"></x:Static></Label>
    7994                <Label Grid.Row="0" Margin="150,0,0,0" Name="lblSignatureLength"></Label>
    8095                <RichTextBox Grid.Row="1" Name="rtbResult" MaxWidth="450" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextChanged="rtbResult_TextChanged"></RichTextBox>
    81                 <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">Verschlüsselt</Label>
     96                <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">
     97                    <x:Static Member="lang:SigGenKuehnCtrl.encrypted"></x:Static></Label>
    8298                <Label Grid.Row="2" Margin="150,0,0,0" Name="lblEncryptedSignatureLength"></Label>
    8399                <TextBox Grid.Row="3" Name="tbResultEncrypted" TextWrapping="Wrap" MaxWidth="450" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextChanged="tbResultEncrypted_TextChanged"></TextBox>
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenControl.xaml.cs

    r1778 r1885  
    1212using System.Windows.Navigation;
    1313using System.Windows.Shapes;
    14 //using Cryptool.PluginBase.Miscellaneous;
    1514using PKCS1.Library;
    16 using Org.BouncyCastle.Math;
     15using PKCS1.Resources.lang.Gui;
    1716
    1817namespace PKCS1.WpfControls.Components
     
    3534        private void handleCustomEvent(ParameterChangeType type)
    3635        {
    37             //this.tbResult.Text = String.Empty;
    3836            this.tbResultEncrypted.Text = String.Empty;
    3937            this.lblPublicKeyRes.Content = RsaKey.Instance.PubExponent.ToString();
     
    4543            this.m_RSASignature = (RsaSig) SignatureHandler.getInstance().getSignature();
    4644            this.m_RSASignature.GenerateSignature();
    47             //this.tbResult.Text = this.m_RSASignature.GetSignatureDecToHexString();
    4845            UserControlHelper.loadRtbColoredSig(this.rtbResult, this.m_RSASignature.GetSignatureDecToHexString());
    4946            this.tbResultEncrypted.Text = this.m_RSASignature.GetSignatureToHexString();
    5047
    5148            // nur temp
    52             SignatureHandler.getInstance().setSignature(this.m_RSASignature);
     49            //SignatureHandler.getInstance().setSignature(this.m_RSASignature);
    5350        }
    5451
    5552        private void tbResultEncrypted_TextChanged(object sender, TextChangedEventArgs e)
    5653        {
    57             this.lblEncryptedSignatureLength.Content = "(Länge: " + this.tbResultEncrypted.Text.Length * 4 + " bit)";
     54            this.lblEncryptedSignatureLength.Content = "(" + Common.length +": " + this.tbResultEncrypted.Text.Length * 4 + " " + Common.bit + ")";
    5855        }
    5956
    6057        private void rtbResult_TextChanged(object sender, TextChangedEventArgs e)
    6158        {
    62             this.lblSignatureLength.Content = "(Länge: " + UserControlHelper.GetRtbTextLength(this.rtbResult) * 4 + " bit)";
     59            this.lblSignatureLength.Content = "(" + Common.length + ": " + UserControlHelper.GetRtbTextLength(this.rtbResult) * 4 + " " + Common.bit + ")";
    6360        }
    6461    }
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenKuehnControl.xaml

    r1744 r1885  
    44    xmlns:my="clr-namespace:PKCS1.WpfResources"
    55    xmlns:lib="clr-namespace:PKCS1.Library"
     6    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    67    VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
    78    <UserControl.Resources>
     
    1516        </Grid.RowDefinitions>
    1617        <!-- Generate Signature -->
    17         <GroupBox Header="Signatur generieren" Name="gbSigGen" Grid.Row="0">
     18        <GroupBox Name="gbSigGen" Grid.Row="0">
     19            <GroupBox.Header>
     20                <x:Static Member="lang:SigGenKuehnCtrl.genSig"></x:Static>
     21            </GroupBox.Header>
    1822            <Grid>
    1923                <Grid.ColumnDefinitions>
     
    2933                        <RowDefinition Height="*" />
    3034                    </Grid.RowDefinitions>
    31                     <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">RSA-Schlüsselgröße (in Bit):</Label>
    32                     <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Öffentlicher Schlüssel:</Label>
    33                     <Label Grid.Row="2" Name="lblIterations" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Max. Anzahl an Iterationen:</Label>
     35                    <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     36                        <x:Static Member="lang:SigGenKuehnCtrl.rsaKeySize"></x:Static></Label>
     37                    <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     38                        <x:Static Member="lang:SigGenKuehnCtrl.pubKey"></x:Static></Label>
     39                    <Label Grid.Row="2" Name="lblIterations" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">
     40                        <x:Static Member="lang:SigGenKuehnCtrl.maxIterations"></x:Static></Label>
    3441                </Grid>
    3542                <!-- middle -->
     
    6471                        <RowDefinition Height="*" />
    6572                    </Grid.RowDefinitions>
    66                     <GroupBox Grid.Row="0" Header="Struktur" Name="gbStruct" Height="47" Width="200" HorizontalAlignment="Right" VerticalAlignment="Top">
     73                    <GroupBox Grid.Row="0" Name="gbStruct" Height="47" Width="200" HorizontalAlignment="Right" VerticalAlignment="Top">
     74                        <GroupBox.Header>
     75                            <x:Static Member="lang:SigGenKuehnCtrl.structure"></x:Static>
     76                        </GroupBox.Header>
    6777                        <Grid>
    6878                            <Grid.ColumnDefinitions>
     
    8090                            <Label Grid.Column="3">'00'</Label>
    8191                            <Label Grid.Column="4" Foreground="Blue">HI</Label>
    82                             <Label Grid.Column="5" Foreground="Red">HW</Label>
     92                            <Label Grid.Column="5" Foreground="Red">HD</Label>
    8393                            <Label Grid.Column="6">GG</Label>
    8494                        </Grid>
    8595                    </GroupBox>
    86                     <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">Gefälschte Signatur generieren</Button>
     96                    <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">
     97                        <x:Static Member="lang:SigGenKuehnCtrl.genFakeSig"></x:Static></Button>
    8798                </Grid>
    8899            </Grid>
     
    93104       
    94105        <!-- Result -->
    95         <GroupBox Header="Generierte Signatur" Name="gbSigRes" Grid.Row="2" Margin="0,15,0,0">
     106        <GroupBox Header="Erzeugte Signatur" Name="gbSigRes" Grid.Row="2" Margin="0,15,0,0">
    96107            <Grid>
    97108                <Grid.RowDefinitions >
     
    101112                    <RowDefinition Height="*" />
    102113                </Grid.RowDefinitions>
    103                 <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">Unverschlüsselt</Label>
     114                <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">
     115                    <x:Static Member="lang:SigGenKuehnCtrl.decrypted"></x:Static></Label>
    104116                <Label Grid.Row="0" Margin="150,0,0,0" Name="lblSignatureLength"></Label>
    105117                <RichTextBox Grid.Row="1" Name="rtbResult" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" MaxWidth="450" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" TextChanged="rtbResult_TextChanged"></RichTextBox>
    106                 <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">Verschlüsselt</Label>
     118                <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">
     119                    <x:Static Member="lang:SigGenKuehnCtrl.encrypted"></x:Static></Label>
    107120                <Label Grid.Row="2" Margin="150,0,0,0" Name="lblEncryptedSignatureLength"></Label>
    108121                <TextBox Grid.Row="3" Name="tbResultEncrypted" TextWrapping="Wrap" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" MaxWidth="450" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" TextChanged="tbResultEncrypted_TextChanged"></TextBox>
  • trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenKuehnControl.xaml.cs

    r1778 r1885  
    1313using System.Windows.Shapes;
    1414using PKCS1.Library;
     15using PKCS1.Resources.lang.Gui;
    1516
    1617namespace PKCS1.WpfControls.Components
     
    4546            Cursor = Cursors.Wait;
    4647
    47             //this.Signature = (KuehnSig)SignatureHandler.getInstance().getKuehnSig();
    48 
    4948            if (this.Signature.GenerateSignature())
    5049            {
     
    5554            else
    5655            {
    57                 this.tbError.Text = "Signatur konnte nicht erstellt werden. Es ist das Limit an Iterationen erreicht worden.";
     56                this.tbError.Text = SigGenKuehnCtrl.genSigErrorMaxIter;
    5857            }
    5958
     
    6362        private void tbResultEncrypted_TextChanged(object sender, TextChangedEventArgs e)
    6463        {           
    65             this.lblEncryptedSignatureLength.Content = "(Länge: " + this.tbResultEncrypted.Text.Length * 4 + " bit)";
     64            this.lblEncryptedSignatureLength.Content = "(" + Common.length + ": " + this.tbResultEncrypted.Text.Length * 4 + " " + Common.bit +")";
    6665        }
    6766
    6867        private void rtbResult_TextChanged(object sender, TextChangedEventArgs e)
    6968        {
    70             this.lblSignatureLength.Content = "(Länge: " + UserControlHelper.GetRtbTextLength(this.rtbResult) * 4 + " bit)";
     69            this.lblSignatureLength.Content = "(" + Common.length + ": " + UserControlHelper.GetRtbTextLength(this.rtbResult) * 4 + " " + Common.bit + ")";
    7170        }
    7271
  • trunk/CrypPlugins/PKCS1/WpfControls/RsaKeyGen/RsaKeyGenControl.xaml

    r1778 r1885  
    44    xmlns:my="clr-namespace:PKCS1.WpfResources"
    55    xmlns:lib="clr-namespace:PKCS1.Library"
     6    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    67    HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    78    <UserControl.Resources>
     
    1415            <RowDefinition Height="auto" />
    1516        </Grid.RowDefinitions>
    16             <GroupBox Grid.Row="0" Header="RSA-Schlüssel generieren" Margin="0,0,0,0">
     17            <GroupBox Grid.Row="0" Margin="0,0,0,0">
     18                <GroupBox.Header>
     19                    <x:Static Member="lang:RsaKeyGenCtrl.genRsaKey"></x:Static>
     20                </GroupBox.Header>
    1721            <Grid>
    1822                <Grid.RowDefinitions>
     
    3135                            <RowDefinition Height="auto" />
    3236                        </Grid.RowDefinitions>
    33                         <Label Grid.Row="0" Margin="5,0,5,0">Öffentlicher Schlüssel:</Label>
    34                         <Label Grid.Row="1" Margin="5,0,5,5">Bitgröße des Modulus:</Label>
     37                            <Label Grid.Row="0" Margin="5,0,5,0">
     38                                <x:Static Member="lang:RsaKeyGenCtrl.pubKey"></x:Static></Label>
     39                            <Label Grid.Row="1" Margin="5,0,5,5">
     40                                <x:Static Member="lang:RsaKeyGenCtrl.bitSize"></x:Static>
     41                            </Label>
    3542                    </Grid>
    3643                    <Grid Grid.Column="1">
     
    6471                        </Grid.RowDefinitions>
    6572                            <DockPanel Grid.Row="0">
    66                                 <Label Margin="5,0,5,0">(muss 3 sein, um Angriffe durchführen zu können)</Label>
     73                                <Label Margin="5,0,5,0">
     74                                    <x:Static Member="lang:RsaKeyGenCtrl.pubKeyComment"></x:Static></Label>
    6775                                <Image Name="btnHelpPubKey" Cursor="Hand" Source="../../Resources/icons/help.png" Width="16" Height="16" HorizontalAlignment="Right" MouseLeftButtonDown="btn_Help_MouseLeftButtonDown" />
    6876                            </DockPanel>
    6977                            <DockPanel Grid.Row="1">
    70                                 <Label Margin="5,0,5,5">(in Bit)</Label>
     78                                <Label Margin="5,0,5,5">
     79                                    <x:Static Member="lang:RsaKeyGenCtrl.bitSizeUnit"></x:Static>
     80                                </Label>
    7181                                <Image Name="btnHelpBitSizeModulus" Cursor="Hand" Source="../../Resources/icons/help.png" Width="16" Height="16" HorizontalAlignment="Right" MouseLeftButtonDown="btn_Help_MouseLeftButtonDown" />
    7282                            </DockPanel>
     
    8797                                Path=(Validation.Errors),
    8898                                Converter={StaticResource eToMConverter}}" />
    89                         <Button Grid.Column="2" Name="btnGenRsaKey" Click="btnGenRsaKey_Click" Height="25" MinWidth="100" VerticalAlignment="Bottom" HorizontalContentAlignment="Right">Schlüssel generieren</Button>
     99                        <Button Grid.Column="2" Name="btnGenRsaKey" Click="btnGenRsaKey_Click" Height="25" MinWidth="100" VerticalAlignment="Bottom" HorizontalContentAlignment="Right">
     100                            <x:Static Member="lang:RsaKeyGenCtrl.genKey"></x:Static>
     101                        </Button>
    90102                </Grid>
    91103            </Grid>
    92104        </GroupBox>       
    93             <GroupBox Grid.Row="1" Header="Generierter Schlüssel" Margin="0,15,0,0">
     105            <GroupBox Grid.Row="1" Margin="0,15,0,0">
     106                <GroupBox.Header>
     107                    <x:Static Member="lang:RsaKeyGenCtrl.generatedKey"></x:Static>
     108                </GroupBox.Header>
    94109                <Grid>
    95110                <Grid.RowDefinitions>
     
    99114                    <RowDefinition Height="auto" />
    100115                </Grid.RowDefinitions>
    101                 <Label Grid.Row="0">Privater Schlüssel</Label>
     116                    <Label Grid.Row="0">
     117                        <x:Static Member="lang:RsaKeyGenCtrl.privKey"></x:Static></Label>
    102118                <Label Grid.Row="0" Margin="150,0,0,0" Name="lblPrivKeyLength"></Label>
    103119                <TextBox Grid.Row="1" Name="tbResultPrivKey" IsReadOnly="True" TextWrapping="Wrap" MaxWidth="450" MinHeight="80" Margin="5,0,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextChanged="tbResultPrivKey_TextChanged"></TextBox>
    104                 <Label Grid.Row="2">Modulus</Label>
     120                    <Label Grid.Row="2">
     121                        <x:Static Member="lang:RsaKeyGenCtrl.mod"></x:Static></Label>
    105122                <Label Grid.Row="2" Margin="150,0,0,0" Name="lblModulusLength"></Label>
    106123                <TextBox Grid.Row="3" Name="tbResultModulus" IsReadOnly="True" TextWrapping="Wrap" MaxWidth="450" MinHeight="80" Margin="5,0,5,5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextChanged="tbResultModulus_TextChanged"></TextBox>
  • trunk/CrypPlugins/PKCS1/WpfControls/SigGen/SigGenPkcs1Control.xaml

    r1650 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4              xmlns:comp="clr-namespace:PKCS1.WpfControls.Components"
     4    xmlns:comp="clr-namespace:PKCS1.WpfControls.Components"
     5    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    56    VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="White">
    67    <UserControl.Resources>
     
    1819           
    1920            <TabControl Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionChanged="TabControl_SelectionChanged" Margin="0,5,0,0">
    20                 <comp:HelpTabItem Header="Datenblock generieren" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenDatablock" HelpButtonClick="TabItem_HelpButtonClick">
     21                <comp:HelpTabItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenDatablock" HelpButtonClick="TabItem_HelpButtonClick">
     22                    <comp:HelpTabItem.Header>
     23                        <x:Static Member="lang:DatablockCtrl.genDatablock"></x:Static>
     24                    </comp:HelpTabItem.Header>
    2125                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    2226                        <comp:DatablockControl x:Name="Datablockcontrol" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    2327                    </ScrollViewer>
    2428                </comp:HelpTabItem>
    25                 <comp:HelpTabItem Header="Signatur generieren" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenSignature" HelpButtonClick="TabItem_HelpButtonClick">                   
     29                <comp:HelpTabItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenSignature" HelpButtonClick="TabItem_HelpButtonClick">
     30                    <comp:HelpTabItem.Header>
     31                        <x:Static Member="lang:SigGenRsaCtrl.genSig"></x:Static>
     32                    </comp:HelpTabItem.Header>
    2633                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    2734                        <comp:SigGenControl x:Name="sigGen" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
  • trunk/CrypPlugins/PKCS1/WpfControls/SigGenFake/SigGenFakeBleichenbControl.xaml

    r1742 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4              xmlns:comp="clr-namespace:PKCS1.WpfControls.Components"
     4    xmlns:comp="clr-namespace:PKCS1.WpfControls.Components"
     5    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"             
    56    VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="White">
    67    <UserControl.Resources>
     
    1415        <Grid>
    1516            <TabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,5,0,0">
    16                 <comp:HelpTabItem Header="Datenblock generieren" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenDatablock" HelpButtonClick="TabItem_HelpButtonClick">
     17                <comp:HelpTabItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenDatablock" HelpButtonClick="TabItem_HelpButtonClick">
     18                    <comp:HelpTabItem.Header>
     19                        <x:Static Member="lang:DatablockCtrl.genDatablock"></x:Static>
     20                    </comp:HelpTabItem.Header>
    1721                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    1822                        <comp:DatablockControl x:Name="Datablockcontrol2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    1923                    </ScrollViewer>
    2024                </comp:HelpTabItem>
    21                 <comp:HelpTabItem Header="Signatur generieren" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenSignature" HelpButtonClick="TabItem_HelpButtonClick">
     25                <comp:HelpTabItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenSignature" HelpButtonClick="TabItem_HelpButtonClick">
     26                    <comp:HelpTabItem.Header>
     27                        <x:Static Member="lang:SigGenBleichenbCtrl.genSig"></x:Static>
     28                    </comp:HelpTabItem.Header>
    2229                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    2330                        <comp:SigGenBleichenbControl x:Name="sigGen2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></comp:SigGenBleichenbControl>
  • trunk/CrypPlugins/PKCS1/WpfControls/SigGenFake/SigGenFakeShortControl.xaml

    r1650 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4              xmlns:comp="clr-namespace:PKCS1.WpfControls.Components"
     4    xmlns:comp="clr-namespace:PKCS1.WpfControls.Components"
     5    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    56    VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="White">
    67    <UserControl.Resources>
     
    1415    <Grid>
    1516            <TabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,5,0,0">
    16                 <comp:HelpTabItem Header="Datenblock generieren" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenDatablock" HelpButtonClick="TabItem_HelpButtonClick">
     17                <comp:HelpTabItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenDatablock" HelpButtonClick="TabItem_HelpButtonClick">
     18                    <comp:HelpTabItem.Header>
     19                        <x:Static Member="lang:DatablockCtrl.genDatablock"></x:Static>
     20                    </comp:HelpTabItem.Header>
    1721                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    1822                        <comp:DatablockControl x:Name="DatablockControl3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
    1923                    </ScrollViewer>
    2024                </comp:HelpTabItem>
    21                 <comp:HelpTabItem Header="Signatur generieren" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenSignature" HelpButtonClick="TabItem_HelpButtonClick">
     25                <comp:HelpTabItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="tabGenSignature" HelpButtonClick="TabItem_HelpButtonClick">
     26                    <comp:HelpTabItem.Header>
     27                        <x:Static Member="lang:SigGenKuehnCtrl.genSig"></x:Static>
     28                    </comp:HelpTabItem.Header>
    2229                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    2330                        <comp:SigGenKuehnControl x:Name="sigGen3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
  • trunk/CrypPlugins/PKCS1/WpfControls/SigVal/SigValControl.xaml

    r1775 r1885  
    22    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4    xmlns:lang="clr-namespace:PKCS1.Resources.lang.Gui"
    45    HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    56    <ScrollViewer  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
     
    1617                </Grid.RowDefinitions>
    1718
    18                 <GroupBox Grid.Row="0" Header="Signatur verifizieren" Margin="0,0,0,0" Name="gbImpl">
     19                <GroupBox Grid.Row="0" Margin="0,0,0,0" Name="gbImpl">
     20                    <GroupBox.Header>
     21                        <x:Static Member="lang:SigValCtrl.verifySig"></x:Static>
     22                    </GroupBox.Header>
    1923                    <Grid>
    2024                        <Grid.ColumnDefinitions>
     
    3236                            </Grid.RowDefinitions>
    3337                            <Label Grid.Row="0" >Zu testende Signatur:</Label>
    34                             <RadioButton Grid.Row="1" Name="rbSigPkcs" Margin="5,5,5,5" Checked="rbSigPkcs_Checked">PKCS#1-Signatur</RadioButton>
    35                             <RadioButton Grid.Row="2" Name="rbSigBlei" Margin="5,5,5,5" Checked="rbSigBlei_Checked">Bleichenbacher Signatur</RadioButton>
    36                             <RadioButton Grid.Row="3" Name="rbSigKuehn" Margin="5,5,5,5" Checked="rbSigKuehn_Checked">Kuehn Signatur</RadioButton>
     38                            <RadioButton Grid.Row="1" Name="rbSigPkcs" Margin="5,5,5,5" Checked="rbSigPkcs_Checked">
     39                                <x:Static Member="lang:SigValCtrl.rsaSig"></x:Static></RadioButton>
     40                            <RadioButton Grid.Row="2" Name="rbSigBlei" Margin="5,5,5,5" Checked="rbSigBlei_Checked">
     41                                <x:Static Member="lang:SigValCtrl.bleichenbSig"></x:Static></RadioButton>
     42                            <RadioButton Grid.Row="3" Name="rbSigKuehn" Margin="5,5,5,5" Checked="rbSigKuehn_Checked">
     43                                <x:Static Member="lang:SigValCtrl.kuehnSig"></x:Static></RadioButton>
    3744                        </Grid>
    3845                        <Grid Grid.Column="2">
     
    4148                                <RowDefinition Height="auto" />
    4249                                <RowDefinition Height="auto" />
     50                                <RowDefinition Height="auto" />
    4351                            </Grid.RowDefinitions>
    44                             <Label Grid.Row="0" >Implementierung:</Label>
    45                             <RadioButton Grid.Row="1" Name="rbVal" Margin="5,5,5,5" Checked="rbVal_Checked">Korrekt (PKCS#1 Version 2.1)</RadioButton>
    46                             <RadioButton Grid.Row="2" Name="rbValWithFlaw" Margin="5,5,5,5" Checked="rbValWithFlaw_Checked">Fehlerhaft (PKCS#1 Version1.5)</RadioButton>
    47                         </Grid>
    48                         <Button Grid.Column="3" Name="bValidate" Margin="5,5,5,5" Height="25" MinWidth="100" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="bValidate_Click">Signatur verifizieren</Button>
     52                            <Label Grid.Row="0" >
     53                                <x:Static Member="lang:SigValCtrl.impl"></x:Static></Label>
     54                            <RadioButton Grid.Row="1" Name="rbVal" Margin="5,5,5,5" Checked="rbVal_Checked">
     55                                <x:Static Member="lang:SigValCtrl.implCorrect"></x:Static></RadioButton>
     56                            <RadioButton Grid.Row="2" Name="rbValWithFlaw" Margin="5,5,5,5" Checked="rbValWithFlaw_Checked">
     57                                <x:Static Member="lang:SigValCtrl.implFlaw"></x:Static></RadioButton>
     58                            <Button Grid.Row="3" Name="bValidate" Margin="5,5,5,5" Height="25" MinWidth="100" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="bValidate_Click">
     59                                <x:Static Member="lang:SigValCtrl.verifySig"></x:Static></Button>
     60                        </Grid>                       
    4961                    </Grid>
    5062                </GroupBox>
    5163                <DockPanel Grid.Row="1">
    52                     <Label VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,5,5,5">Ergebnis: </Label>
     64                    <Label VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,5,5,5">
     65                        <x:Static Member="lang:SigValCtrl.result"></x:Static></Label>
    5366                    <Image Name="imgResult" Height="26" Width="24" Source="../../Resources/icons/equal.png" Visibility="Hidden" />
    5467                    <Label Name="lblResult" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,5,5"> </Label>
     
    5770            </Grid>
    5871            <!-- Display Signatures -->
    59             <GroupBox Grid.Row="1" Header="Signatur" Margin="0,15,0,0">
     72            <GroupBox Grid.Row="1" Margin="0,15,0,0">
     73                <GroupBox.Header>
     74                    <x:Static Member="lang:SigValCtrl.signature"></x:Static>
     75                </GroupBox.Header>
    6076            <Grid>
    6177                <Grid.RowDefinitions>
     
    6581                    <RowDefinition Height="auto" />
    6682                </Grid.RowDefinitions>
    67                 <Label Grid.Row="0">Verschlüsselte Signatur</Label>
     83                    <Label Grid.Row="0">
     84                        <x:Static Member="lang:SigValCtrl.encSig"></x:Static></Label>
    6885                <TextBox Grid.Row="1" Name="tbSignatureEnc" TextWrapping="Wrap" MaxWidth="450" MinHeight="80"  IsReadOnly="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5" />
    69                 <Label Grid.Row="2">Unverschlüsselte Signatur</Label>
     86                    <Label Grid.Row="2">
     87                        <x:Static Member="lang:SigValCtrl.decSig"></x:Static></Label>
    7088                <TextBox Grid.Row="3" Name="tbSignatureDec" TextWrapping="Wrap" MaxWidth="450" MinHeight="80" IsReadOnly="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5" />
    7189            </Grid>
  • trunk/CrypPlugins/PKCS1/WpfControls/SigVal/SigValControl.xaml.cs

    r1778 r1885  
    1414using Org.BouncyCastle.Crypto;
    1515using Org.BouncyCastle.Security;
    16 
    1716using PKCS1.Library;
     17using PKCS1.Resources.lang.Gui;
    1818
    1919namespace PKCS1.WpfControls.SigVal
     
    5151
    5252            this.rbSigBlei.IsEnabled = false;
    53             this.rbSigBlei.Content = "Bleichenbacher Signatur (noch nicht generiert)";
     53            this.rbSigBlei.Content = SigValCtrl.bleichenbSig + " " + SigValCtrl.sigNotGeneratedYet;
    5454            this.rbSigPkcs.IsEnabled = false;
    55             this.rbSigPkcs.Content = "PKCS#1-Signatur (noch nicht generiert)";
     55            this.rbSigPkcs.Content = SigValCtrl.rsaSig + " " + SigValCtrl.sigNotGeneratedYet;
    5656            this.rbSigKuehn.IsEnabled = false;
    57             this.rbSigKuehn.Content = "Kuehn Signatur (noch nicht generiert)";
     57            this.rbSigKuehn.Content = SigValCtrl.kuehnSig + " " + SigValCtrl.sigNotGeneratedYet;
    5858
    5959           
     
    6464                this.rbSigPkcs.IsEnabled = true;
    6565                this.rbSigPkcs.IsChecked = true;
    66                 this.rbSigPkcs.Content = "PKCS#1-Signatur";
     66                this.rbSigPkcs.Content = SigValCtrl.rsaSig;
    6767            }
    6868            else if (SignatureHandler.getInstance().isBleichenbSigGenerated())
     
    7272                this.rbSigBlei.IsEnabled = true;
    7373                this.rbSigBlei.IsChecked = true;
    74                 this.rbSigBlei.Content = "Bleichenbacher Signatur";
     74                this.rbSigBlei.Content = SigValCtrl.bleichenbSig;
    7575            }
    7676            else if (SignatureHandler.getInstance().isKuehnSigGenerated())
     
    8080                this.rbSigKuehn.IsEnabled = true;
    8181                this.rbSigKuehn.IsChecked = true;
    82                 this.rbSigKuehn.Content = "Kuehn Signatur";
     82                this.rbSigKuehn.Content = SigValCtrl.kuehnSig;
    8383            }
    8484            else
     
    9696                this.rbSigPkcs.IsEnabled = true;
    9797                this.rbSigPkcs.IsChecked = true;
    98                 this.rbSigPkcs.Content = "PKCS#1-Signatur";
     98                this.rbSigPkcs.Content = SigValCtrl.rsaSig;
    9999                this.ResultEmpty();
    100100            }
     
    105105                this.rbSigBlei.IsEnabled = true;
    106106                this.rbSigBlei.IsChecked = true;
    107                 this.rbSigBlei.Content = "Bleichenbacher Signatur";
     107                this.rbSigBlei.Content = SigValCtrl.bleichenbSig;
    108108                this.ResultEmpty();
    109109            }
     
    114114                this.rbSigKuehn.IsEnabled = true;
    115115                this.rbSigKuehn.IsChecked = true;
    116                 this.rbSigKuehn.Content = "Kuehn Signatur";
     116                this.rbSigKuehn.Content = SigValCtrl.kuehnSig;
    117117                this.ResultEmpty();
    118118            }
     
    121121        private void setDisabled()
    122122        {
    123             this.tbSignatureDec.Text = "keine Signatur generiert. Bitte generieren Sie zuerst eine Signatur";
    124             this.tbSignatureEnc.Text = "keine Signatur generiert. Bitte generieren Sie zuerst eine Signatur";
     123            this.tbSignatureDec.Text = SigValCtrl.plsGenSigFirst;
     124            this.tbSignatureEnc.Text = SigValCtrl.plsGenSigFirst;
    125125
    126126            this.bValidate.IsEnabled = false;
     
    187187        private void ResultValid()
    188188        {
    189             this.lblResult.Content = "Signatur valide";
     189            this.lblResult.Content = SigValCtrl.resSigValid;
    190190            this.imgResult.Source = new BitmapImage(new Uri("../../Resources/icons/equal.png", UriKind.Relative));
    191191            this.imgResult.Visibility = Visibility.Visible;
    192             this.lblHashAlgo.Content = "Erkannter Hashalgorithmus: " + this.validator.getHashFunctionName();
     192            this.lblHashAlgo.Content = SigValCtrl.resIdentifiedHash + " " + this.validator.getHashFunctionName();
    193193        }
    194194
    195195        private void ResultNotValid()
    196196        {
    197             this.lblResult.Content = "Signatur nicht valide";
     197            this.lblResult.Content = SigValCtrl.resSigNotValid;
    198198            this.imgResult.Source = new BitmapImage(new Uri("../../Resources/icons/unequal.png", UriKind.Relative));
    199199            this.imgResult.Visibility = Visibility.Visible;
    200200            if (this.validator.getHashFunctionName() != String.Empty)
    201201            {
    202                 this.lblHashAlgo.Content = "Erkannter Hashalgorithmus: " + this.validator.getHashFunctionName();
     202                this.lblHashAlgo.Content = SigValCtrl.resIdentifiedHash + " " + this.validator.getHashFunctionName();
    203203            }
    204204            else
    205205            {
    206                 this.lblHashAlgo.Content = " Hashalgorithmus: nicht auslesbar";
     206                this.lblHashAlgo.Content = " " + SigValCtrl.resHashNotReadable;
    207207            }
    208208        }
  • trunk/CrypPlugins/PKCS1/WpfControls/Start/StartControl.xaml.cs

    r1650 r1885  
    2323    public partial class StartControl : UserControl, IPkcs1UserControl
    2424    {
    25         //public event Navigate OnStartpageLinkClick;
    2625        System.Windows.Forms.WebBrowser b;
    2726
Note: See TracChangeset for help on using the changeset viewer.