usage: require("enlua")
allows you to compile lua code into encrypted bytecode, the contents of which cannot be viewed or decompiled
the encrypted code is loaded using the same library
this library uses the same code as the code encryption in the SComputers menu
sometimes there is a new version of the compiler that encrypts the code more securely and a new version of the interpreter for it
the library retains backward compatibility with older versions of the interpreter so that previously compiled code continues to work
the compiled code contains information about which version of the interpreter it should run on, so you shouldn't worry about it
when you encrypt code using this library, it is encrypted using the latest version of the compiler
the library can be used to encrypt code outside the computer block (for example, to encrypt code on a disk)
methods:
--the library can be used to encrypt code outside the computer block (for example, to encrypt code on a disk)
local enlua = require("enlua")
local bytecode = assert(enlua.compile("myenvtest('hello, encrypted code!')"))
logPrint("last enlua version: ", enlua.lastVersion())
logPrint("bytecode version: ", enlua.version(bytecode))
local func = assert(enlua.load(bytecode, {myenvtest = logPrint})) --you can execute encrypted code in the sandbox in exactly the same way as in the case of a regular loadstring
func()
function callback_loop()
end