【发布时间】:2020-06-06 07:33:15
【问题描述】:
我正在使用 binaryFormatter 加密数据,但我想在不加密的情况下保存它。 所以下次我只是施放它。 这是我正在使用的代码。
//Creat a binaryFormatter
BinaryFormatter formatter = new BinaryFormatter();
//Direction, Filename and Extention
string path = Application.persistentDataPath + "/enem.sav";
//Creat the File (Blank)
FileStream stream = new FileStream(path, FileMode.Create);
//Get the Data
EnemData data = new EnemData();
//Enter the Data and Encrypt it
formatter.Serialize(stream, data);
stream.Close();
【问题讨论】:
-
BinaryFormatter 不会加密您的数据,它只是将您的对象转换为二进制表示。你能指定你想要达到的目标吗? - 因为我并没有真正得到你想要的
-
我只是不想将我的数据转换为二进制,我很难
标签: c# visual-studio unity3d io