public static void WriteAllBytes(string path, byte[] bytes, string key, string iv) { var bs = AESUtil.Encrypt(bytes, key, iv); File.WriteAllBytes(path, bs); }
public static void SetString(string key, string value) { PlayerPrefs.SetString(MD5Util.GetMd5(key), AESUtil.Encrypt(value, AESKey.DefaultKey, AESKey.DefaultIV)); }
public static void WriteAllText(string path, string text, string key, string iv) { var bs = AESUtil.Encrypt(text, key, iv); File.WriteAllText(path, bs); }