Fix an issue with freezing game

This commit is contained in:
2025-06-12 13:23:52 -07:00
parent 733bfbbe0a
commit 17c6b913a4

View File

@@ -11,6 +11,8 @@ public class SensitiveInfo
public static readonly string SERVER_SEND_TRANSFER_KEY = "";
public static string Encrypt(string plainText, string key)
{
try
{
using Aes aes = Aes.Create();
aes.Key = Encoding.UTF8.GetBytes(key);
@@ -29,6 +31,12 @@ public class SensitiveInfo
return Convert.ToBase64String(ms.ToArray());
}
catch
{
Application.Quit();
return "-997"; //the server returns this if theres an issue with encryption/decryption so the client will too ig
}
}
public static string Decrypt(string dataB64, string key)
{