Exemple #1
0
        private void btnDecipher_Click(object sender, EventArgs e)
        {
            VigenereOperation vigenereOperation = new VigenereOperation();
            CipherText        cipherText        = new CipherText();

            vigenereOperation.plainText                 = tbxCipherText.Text.ToLower().ToString();
            vigenereOperation.secretKey                 = tbxSecretKey.Text.ToLower().ToString();
            vigenereOperation.cipherOrDecipher          = -1;
            vigenereOperation.decipherAlphabetDecreaser = 29;

            vigenereOperation = cipherText.CipherGivenText(vigenereOperation);
            tbxPlainText.Text = vigenereOperation.CipherTextVigenere;
        }
Exemple #2
0
        private void btnCipher_Click(object sender, EventArgs e)
        {
            VigenereOperation viginereOperation = new VigenereOperation();
            CipherText        cipherText        = new CipherText();

            viginereOperation.chiperWithSpace = cbxCipherWithSpace.Checked ? true : false;
            viginereOperation.plainText       = tbxPlainText.Text.ToLower().ToString();
            viginereOperation.secretKey       = tbxSecretKey.Text.ToLower().ToString();

            viginereOperation = cipherText.CipherGivenText(viginereOperation);

            tbxCipherText.Text        = viginereOperation.CipherTextVigenere;
            tbxKasiskiCipherText.Text = tbxCipherText.Text;
        }