mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
接入obfuz->2.0
This commit is contained in:
4522
UnityProject/Assets/Obfuz/GeneratedEncryptionVirtualMachine.cs
Normal file
4522
UnityProject/Assets/Obfuz/GeneratedEncryptionVirtualMachine.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 673c197d012a9c549be6c6991ad3fb30
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
UnityProject/Assets/Obfuz/ObfuzInitialize.cs
Normal file
24
UnityProject/Assets/Obfuz/ObfuzInitialize.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Obfuz;
|
||||
using Obfuz.EncryptionVM;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Launcher
|
||||
{
|
||||
public class ObfuzInitialize : MonoBehaviour
|
||||
{
|
||||
// 初始化EncryptionService后被混淆的代码才能正常运行,
|
||||
// 因此尽可能地早地初始化它。
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
|
||||
private static void SetUpStaticSecretKey()
|
||||
{
|
||||
#if ENABLE_OBFUZ
|
||||
Debug.Log("Enable Obfuz");
|
||||
Debug.Log("SetUpStaticSecret begin");
|
||||
EncryptionService<DefaultStaticEncryptionScope>.Encryptor = new GeneratedEncryptionVirtualMachine(Resources.Load<TextAsset>("Obfuz/defaultStaticSecretKey").bytes);
|
||||
Debug.Log("SetUpStaticSecret end");
|
||||
#else
|
||||
Debug.Log("Disable Obfuz");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
3
UnityProject/Assets/Obfuz/ObfuzInitialize.cs.meta
Normal file
3
UnityProject/Assets/Obfuz/ObfuzInitialize.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 883bcac172734133a1972a05275df53b
|
||||
timeCreated: 1753458333
|
8
UnityProject/Assets/Obfuz/SymbolObfus.meta
Normal file
8
UnityProject/Assets/Obfuz/SymbolObfus.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25a2e7cc325e1054db9d6fd1189d5474
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9389
UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml
Normal file
9389
UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b16602403e80c24f85f2d87b7db8bcf
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user