Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Caesar newCaesar = new Caesar();

            Console.WriteLine("Enter your message: ");
            string plainText  = Console.ReadLine();
            string cipherText = newCaesar.Encrypt(plainText);

            Console.WriteLine("Encrypted message is: " + cipherText);
            Console.WriteLine("pres Enter to Decrypt...");
            Console.ReadLine();
            Console.WriteLine("Decrypted message is: " + newCaesar.Decrypt(cipherText));
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("=================");
            Console.WriteLine("CAESAR CIPHER");
            Console.WriteLine("=================");
            Console.WriteLine();
            Console.Write("Enter the string to encrypt :");
            String plainText = Console.ReadLine();
            Console.Write("Enter the integer shift :");
            int shift = Int32.Parse(Console.ReadLine());

            Caesar caesar = new Caesar();
            String cipherText = caesar.Encrypt(plainText, shift);
            Console.WriteLine("Encrypted Text :"+cipherText);
            Console.ReadKey();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("=================");
            Console.WriteLine("CAESAR CIPHER");
            Console.WriteLine("=================");
            Console.WriteLine();
            Console.Write("Enter the string to encrypt :");
            String plainText = Console.ReadLine();

            Console.Write("Enter the integer shift :");
            int shift = Int32.Parse(Console.ReadLine());

            Caesar caesar     = new Caesar();
            String cipherText = caesar.Encrypt(plainText, shift);

            Console.WriteLine("Encrypted Text :" + cipherText);
            Console.ReadKey();
        }