local rc4 = require "rc4.c" local function gen_key(t) local len = #t for i = 1, len do local b = t[i] local c = string.char(b) t[i] = c end local key = table.concat(t) return rc4.rc4(key) end local decode_key = gen_key { 215,100,200,204,233,50,85,196,71,141, 122,160,93,131,243,234,162,183,36,155, 4,62,35,205,40,102,33,27,255,55, 131,214,156,75,163,134,126,249,74,197, 134,197,102,228,72,90,206,235,17,243, 134,22,49,169,227,89,16,5,117,16, 60,248,230,217,68,138,96,194,131,170, 136,10,112,238,238,184,72,189,163,90, 176,42,112,225,212,84,58,228,89,175, 244,150,168,219,112,236,101,208,175,233, 123,55,243,235,37,225,164,110,158,71, 201,78,114,57,48,70,142,106,43,232, 26,32,126,194,252,239,175,98,191,94, 75,59,149,62,39,187,32,203,42,190, 19,243,13,133,45,61,204,187,168,247, 163,194,23,34,133,20,17,52,118,209, 146,193,13,40,255,52,227,32,255,13, 222,18,1,236,152,46,41,100,233,209, 91,141,148,115,175,25,135,193,77,254, 147,224,191,161,9,191,213,236,223,212, 250,190,231,251,170,127,41,212,227,19, 166,63,161,58,179,81,84,59,18,162, 57,166,130,248,71,139,184,28,120,151, 241,115,86,217,111,0,88,153,213,59, 172,123,123,78,182,46,159,10,105,178, 172,163,88,47,155,160, } local function decode_data(data) local o = decode_key:crypt(data) decode_key:reset() return o end for i = 1, 10 do print(decode_data("asdf")) end