示例#1
0
        public static void PolyEncrypt()
        {
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-=[ Polynomial Encryption ]=-");
            Console.WriteLine("This is an example of Polynomial Encryption, each time");
            Console.WriteLine("a message is encrypted the final output will be different");
            Console.WriteLine("even if the message and key are the same. This method");
            Console.WriteLine("is not a secure encryption use kTm Algo for secured crypto.");
            Console.WriteLine("");

            Console.WriteLine("Type the text or message you would like to encrypt:");
            Console.ForegroundColor = ConsoleColor.Green;
            string text = Console.ReadLine();

            Console.WriteLine("");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("Type in a password/key that is 5+ characters long:");
            Console.ForegroundColor = ConsoleColor.Green;
            string pass = Console.ReadLine();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("");

            PolyCrypt.polyEncryptTxt(text, pass);
        }
示例#2
0
        public static void PolyDecrypt()
        {
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-=[ Polynomial Decryption ]=-");
            Console.WriteLine("");

            Console.WriteLine("Paste your encrypted text or message:");
            Console.ForegroundColor = ConsoleColor.Green;
            string text = Console.ReadLine();

            Console.WriteLine("");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("Type in a key/password to decrypt text or message:");
            Console.ForegroundColor = ConsoleColor.Green;
            string pass = Console.ReadLine();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("");

            PolyCrypt.polyDecryptTxt(text, pass);
        }