Beispiel #1
0
        public static void Main()
        {
            Vigenere vigenere = new Vigenere(10);

            string[] tests =
            {
                "ana are mere",
                "AnA aRe MeRe",
                "The brown fox jumped over the fence.",
                "zxcvbnmasdfghjklqwertyuiop"
            };
            Util.TestCriptare(vigenere, tests);
        }
        static void Main(string[] args)
        {
            StreamReader reader = new StreamReader("../../textclar.txt");
            StreamWriter writer = new StreamWriter("../../textcriptat.txt");
            string       key    = reader.ReadLine();
            string       line;
            Vigenere     vig = new Vigenere(key);

            while ((line = reader.ReadLine()) != null)
            {
                writer.WriteLine(vig.Criptare(line));
            }
            reader.Close();
            writer.Close();
        }