I can't be bothered to do a real solution
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
public class SensitiveInfo
|
public class SensitiveInfo
|
||||||
{
|
{
|
||||||
@@ -30,6 +31,8 @@ public class SensitiveInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static string Decrypt(string dataB64, string key)
|
public static string Decrypt(string dataB64, string key)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var data = Convert.FromBase64String(dataB64);
|
var data = Convert.FromBase64String(dataB64);
|
||||||
using Aes aes = Aes.Create();
|
using Aes aes = Aes.Create();
|
||||||
@@ -47,4 +50,10 @@ public class SensitiveInfo
|
|||||||
|
|
||||||
return reader.ReadToEnd();
|
return reader.ReadToEnd();
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Application.Quit();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user