Code security

When publishing a Codea app to the App Store, there is no encryption on the lua files. At all. They’re just sitting there… just waiting to be taken or fooled with. For example, I can say that TouchLine has 5072 lines of code (impressive, even though 50% of them are commented out). Is there any way I can encrypt my code so nobody can just waltz in and copy my code?

@juaxix used to encrypt his Lua code and then decrypt it before loading it into the runtime. That was possible with the old (GitHub) runtime. The new one only accepts a path to load files — we’ll have to look at adding string loading.

@Simeon - Thanks.

Can you not format your code with string.dump()?

but if code are decrypt before loading it into the runtime, we could decrypt it at any time, no ?

@HyroVitalyProtago it would prevent people from inspecting the app package from seeing the plain source code.

Security via obscurity is generally frowned on, but you could do a code mangling util which removed comments, changed variable names to be incomprehensible and eliminated excess white space. It would make it less usable to a dodgy person.