This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- RLE Encryption Algorithm Implementation | |
| -- Used for data compression | |
| -- Assuming original file is 'test.txt' | |
| local file = io.open("test.txt","rb") | |
| local Ssize = file:seek("end") | |
| file:seek("set",0) | |
| --RLEncodes a single string | |
| function encode(std,flag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- RSA Encryption/Decryption Library | |
| -- By 1lann | |
| -- | |
| -- Refer to license: http://pastebin.com/9gWSyqQt | |
| -- | |
| -- See gists comment at the bottom of the page for FAQ and updates! | |
| -- | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local function _W(f) local e=setmetatable({}, {__index = _ENV or getfenv()}) if setfenv then setfenv(f, e) end return f(e) or e end | |
| local bit=_W(function(_ENV, ...) | |
| --[[ | |
| This bit API is designed to cope with unsigned integers instead of normal integers | |
| To do this we add checks for overflows: (x > 2^31 ? x - 2 ^ 32 : x) | |
| These are written in long form because no constant folding. | |
| ]] | |
| local floor = math.floor |