DongYingLiangGuanYiGong/DongYing/Assets/Zion/Scripts/AES/JudgeAes.cs

28 lines
582 B
C#

using AESTool;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JudgeAes : MonoBehaviour
{
public string key;
// Start is called before the first frame update
void Start()
{
CheckKey(key);
}
public void CheckKey(string key)
{
DateTime dateTime = DateTime.Now;
string data = AES.AESDecrypt(key);
DateTime t2 = DateTime.Parse(data);
Debug.Log(t2);
if (DateTime.Compare(dateTime, t2) >= 0)
{
Application.Quit();
}
}
}