示例#1
0
        private static void CaesarHack()
        {
            Console.WriteLine("Input your message to hack");
            string message = Console.ReadLine();

            Console.WriteLine("Variants:");
            CaesarCipher.HackMessage(message);
        }
示例#2
0
        private static void CaesarDecrypt()
        {
            Console.WriteLine("Input your message to decrypt");
            string message = Console.ReadLine();

            Console.WriteLine("Input key");
            int key     = ParseKey();
            var Caesar2 = new CaesarCipher(key);

            Console.WriteLine(Caesar2.DecryptMessage(message));
        }
示例#3
0
        private static void CaesarEncrypt()
        {
            Console.WriteLine("Input your message to encrypt (in English and without punctuation)");
            string message = Console.ReadLine().ToLower();

            message = message.Replace(" ", string.Empty);
            Console.WriteLine("Input key");
            int key     = ParseKey();
            var Caesar1 = new CaesarCipher(key);

            Console.WriteLine(Caesar1.EncryptMessage(message));
        }