public string DecodeDatei(string Datei, ICrypto coder) { string readText = File.ReadAllText(Datei, Encoding.UTF7); string Encodedtext = coder.Decode(readText); try { string newDateiPfad = @"C:\Users\Marvin.Lehnert\Desktop\DecodedText.txt"; File.WriteAllText(newDateiPfad, Encodedtext, Encoding.UTF8); } catch (Exception ex) { Console.WriteLine(ex); } return(Encodedtext); }
static void Main() { Console.Write(@"Write encrypted password: "******"Your decoded password: {decodedPassword}"); Console.WriteLine($@"{Environment.NewLine}Password was copied to clipboard{Environment.NewLine}{Environment.NewLine}Press enter to exit.."); Console.ReadKey(); }