public static string GetString(string key, string opt = default(string)) { var ret = PlayerPrefs.GetString(MD5Util.GetMD5(key)); if (string.IsNullOrEmpty(ret)) { return(opt); } else { return(AESUtil.Decrypt(ret, AESKey.DefaultKey, AESKey.DefaultIV)); } }
public static string ReadAllText(string path, string key, string iv) { var text = File.ReadAllText(path); return(AESUtil.Decrypt(text, key, iv)); }
public static byte[] ReadAllBytes(string path, string key, string iv) { var text = File.ReadAllBytes(path); return(AESUtil.Decrypt(text, key, iv)); }