Ejemplo n.º 1
0
        public void TestMethod1()
        {
            string input  = "ABC";
            string output = "CDE";
            int    shift  = 2;

            string encrypted = cc.encrypt(input, shift);
            string decrypted = cc.decrypt(encrypted, shift);

            Assert.AreEqual(encrypted, output);
            Assert.AreEqual(decrypted, input);
        }
Ejemplo n.º 2
0
        private void decode_using_cesare()
        {
            CaesarCipher cipher = new CaesarCipher(Convert.ToInt32(cipher_keybox.Text));

            cipher_output.Text = cipher.decrypt(cipher_input.Text.Trim());
        }