예제 #1
0
 private void changeBlockAndKeySize()
 {
     /*
      * if (rb1.Checked) { blockSize = 32; keySize = 64; }
      * if (rb1.Checked) { blockSize = 48; keySize = 72; }
      * if (rb1.Checked) { blockSize = 48; keySize = 96; }
      * if (rb1.Checked) { blockSize = 64; keySize = 96; }
      * if (rb1.Checked) { blockSize = 64; keySize = 128;}
      * if (rb1.Checked) { blockSize = 96; keySize = 96; }
      * if (rb1.Checked) { blockSize = 96; keySize = 144; }
      */
     if (rb128.Checked)
     {
         blockSize = 128; keySize = 128; tbKey.Text = ""; tbKey.MaxLength = 16;
     }
     if (rb192.Checked)
     {
         blockSize = 128; keySize = 192; tbKey.Text = ""; tbKey.MaxLength = 24;
     }
     if (rb256.Checked)
     {
         blockSize = 128; keySize = 256; tbKey.Text = ""; tbKey.MaxLength = 32;
     }
     label4.Text = keySize + " bits";
     simonCipher = new Simon(blockSize, keySize);
 }
예제 #2
0
 public Form1()
 {
     InitializeComponent();
     blockSize   = 128;
     keySize     = 128;
     simonCipher = new Simon(blockSize, keySize);
 }