如何加密Lua代码 [英] How to encrypt Lua codes
问题描述
我要使用我的Corona SDK保护我的项目中的Lua代码.
I want to protect my Lua codes on my project, I'm using Corona SDK.
我看到一些lua文件像这样被混淆了
I saw some lua files being obfuscated like this one
https://github.com/ChartBoost/corona- sdk/blob/master/ChartboostSDK/chartboost.lua
是否有任何应用程序可以保护我的源代码?
Is there any application to protect my source code?
推荐答案
您提到的文件未加密:它只是Lua 5.1的预编译字节码.可以用luac -l -p
读取(不是以源形式,而是以VM指令形式,这可能足以重建源).如果要重建源,请尝试 LuaDec for Lua 5.1 .
The file you mentioned is not encrypted: it's just precompiled bytecode for Lua 5.1. It can be read with luac -l -p
(not in source form but in VM instructions, which are probably enough to reconstruct the source). If you want to reconstruct the source, try LuaDec for Lua 5.1.
您可以使用luac
或string.dump
预编译代码.
You can precompile your code using luac
or string.dump
.
这篇关于如何加密Lua代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!