OK, I got some guys solution:
In “lauxlib.c”, you need change this function:
LUALIB_API int luaL_loadfile (lua_State L, const charfilename)
and all processes below:
- support you need encrypt aaa.lua.
- gzip with password —> aaa.lua.
- in luaL_loadfile, read aaa.lua buff and ungzip the buff.
If u still worry your password got hacked. u can add some kinky encode/decode functions in step2.
And if hackers break your app package. He can only get a load of binary files which only can decode in your APPS.
Hope cocos2d-x.org can provide tools and libs to protect our sweaty works.