如何加密Lua代码 [英] How to encrypt Lua codes

查看:884
本文介绍了如何加密Lua代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用我的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.

您可以使用luacstring.dump预编译代码.

You can precompile your code using luac or string.dump.

这篇关于如何加密Lua代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆