From 6a817f1b019873b08e2f0a5fbe40d5a03ddae20c Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 1 Dec 2021 17:24:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90AB=E5=8A=A0=E5=AF=86=E3=80=91=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E5=B7=A5=E5=85=B7=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Utility/MEncyptUtil.cs | 95 +++++++++++++++++++ .../Scripts/Utility/MEncyptUtil.cs.meta | 11 +++ 2 files changed, 106 insertions(+) create mode 100644 Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs create mode 100644 Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs.meta diff --git a/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs b/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs new file mode 100644 index 0000000000..3ce5da801d --- /dev/null +++ b/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs @@ -0,0 +1,95 @@ +using UnityEngine; +using System.Collections.Generic; +using System.Reflection; +using LuaInterface; +using System; +using System.IO; +using UnityEditor; + +namespace GameLogic { + public static class MEncyptUtil { + // + //加密/解密 + static byte[] crypt(byte[] data, string key) + { + int[] ri = new int[data.Length]; + byte[] cl = System.Text.Encoding.Default.GetBytes(key); + for(long i = 0; i