Add a custom key for if someone makes a mod of the game it won't clash with the main savefile
This commit is contained in:
@@ -44,7 +44,7 @@ public class BazookaManager : MonoBehaviour
|
||||
|
||||
public void Load()
|
||||
{
|
||||
string path = Path.Join(Application.persistentDataPath, "BazookaManager.dat");
|
||||
string path = Path.Join(Application.persistentDataPath, SensitiveInfo.BAZOOKA_MANAGER_FILE_KEY + ".dat");
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
File.Create(path).Dispose();
|
||||
@@ -68,7 +68,7 @@ public class BazookaManager : MonoBehaviour
|
||||
#if UNITY_EDITOR
|
||||
return;
|
||||
#else
|
||||
string path = Path.Join(Application.persistentDataPath, "BazookaManager.dat");
|
||||
string path = Path.Join(Application.persistentDataPath, SensitiveInfo.BAZOOKA_MANAGER_FILE_KEY + "BazookaManager.dat");
|
||||
var encoded = SensitiveInfo.EncryptRaw(saveFile.ToString(Formatting.None), SensitiveInfo.BAZOOKA_MANAGER_KEY);
|
||||
if (encoded == null) return;
|
||||
using var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None);
|
||||
|
||||
@@ -10,6 +10,7 @@ public class SensitiveInfo
|
||||
public static readonly string SERVER_RECEIVE_TRANSFER_KEY = "";
|
||||
public static readonly string SERVER_SEND_TRANSFER_KEY = "";
|
||||
public static readonly string BAZOOKA_MANAGER_KEY = "";
|
||||
public static readonly string BAZOOKA_MANAGER_FILE_KEY = "9b9ad7a5a824436144083c19dd071d66";
|
||||
|
||||
public static string Encrypt(string plainText, string key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user