this is my code: local function strenc (message, key) local key_bytes if type (key) = "string" then key_bytes = > for i=1,getn(bytes) do w = strchar(bytes) end > return concat(w) > end > - Roberto Argh, I was about to say the same thing! :-) Well, I can as well publish my results on Win32. Okay so I made a simple encryption in lua but it's returning weird characters instead of normal ones. For instance, te (s,i) can be written as s:byte (i). Therefore, you can use the string functions in object-oriented style. It also sets a metatable for strings where the _index field points to the string table. The string library provides all of its functions inside the table string. When packing, the given string must have at least 'n' characters (extra characters are. `c n ' a sequence of exactly 'n' chars corresponding to a single Lua string. The stream will automatically pack this data into compressed bytes, which often leads to greatly reduced network bandwidth.`E' unsigned 8-byte Integer (64-bits, long long), to/from a UInt64 object. When writing data to a trickle stream, you must specify its size in bits. NOTE - It's probably better to use Lua's built-in string.pack and string.unpack now. I want to optimize it, and have fixed a lot of redundancy, and slow parts.Trickle. One for between characters and one for between words. It formats the string using two delimiters. Z=26, while keeping all other characters intact.
#Windows games download code
The following code takes a string and converts it to it's number equivalent. That byte and anything after it is truncated on the lua side.Lua string parsing. Truncation seems to be reproducible when sending byte strings with \0 in the non-final position. When using comm.socketServerResponse in lua, the retrieved byte string can be shorter than what is sent. The string library assumes one-byte character encodings. For instance, te(s,i) can be written as s:byte(i). The string library provides all its functions inside the table string.