public static void Save(string saveString) { SimplerAES aes = new SimplerAES(); string s = aes.Encrypt(saveString); FileStream fs = new FileStream("Content/SaveFile/Save.txt", FileMode.Truncate); StreamWriter sw = new StreamWriter(fs); sw.WriteLine(s); sw.Close(); fs.Close(); }
public static string Load() { SimplerAES aes = new SimplerAES(); string line = ""; try { using (StreamReader reader = new StreamReader("Content/SaveFile/Save.txt")) { line = reader.ReadLine(); } line = aes.Decrypt(line); } catch { } return(line); }