How to encrypt Lua codes

时光总嘲笑我的痴心妄想 提交于 2019-12-09 06:35:18

问题


I want to protect my Lua codes on my project, I'm using Corona SDK.

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?


回答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.

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



来源:https://stackoverflow.com/questions/17915486/how-to-encrypt-lua-codes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!