Пример #1
0
        public string EncodeDatei(string Datei, ICrypto coder)
        {
            string readText    = File.ReadAllText(Datei, Encoding.UTF7);
            string Encodedtext = coder.Encode(readText);

            try
            {
                string newDateiPfad = @"C:\Users\Marvin.Lehnert\Desktop\EncodedText.txt";
                File.WriteAllText(newDateiPfad, Encodedtext, Encoding.UTF8);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            return(Encodedtext);
        }
Пример #2
0
        static void Main()
        {
            Console.Write(@"Write password: "******"Your encoded password: {encodedPassword}");
            Console.WriteLine($@"{Environment.NewLine}Password was copied to clipboard{Environment.NewLine}{Environment.NewLine}Press enter to exit..");
            Console.ReadKey();
        }