Skip to content

Commit 8ce7b96

Browse files
levno-710gitbook-bot
authored andcommitted
GitBook: [#36] No subject
1 parent d37a6c7 commit 8ce7b96

File tree

1 file changed

+63
-1
lines changed

1 file changed

+63
-1
lines changed

doc/steps/encryptstrings.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,68 @@ print("Hello, World!")
1919
{% code title="out.lua" %}
2020
```lua
2121
-- Settings: None
22-
local x,F do local k=math.floor local I=math.random local Y=table.remove local i=string.char local K=0 local J=2 local Q={}local W={}local q=0 local R={}for F=1,256,1 do R[F]=F end repeat local F=I(1,#R)local x=Y(R,F)W[x]=i(x-1)until#R==0 local j={}local function B()if#j==0 then K=(K*173+8408159861491)%35184372088832 repeat J=(J*160)%257 until J~=1 local F=J%32 local x=(k(K/2^(13-(J-F)/32))%4294967296)/2^F local I=k((x%1)*4294967296)+k(x)local Y=I%65536 local i=(I-Y)/65536 local Q=Y%256 local W=(Y-Q)/256 local q=i%256 local R=(i-q)/256 j={Q,W;q,R}end return table.remove(j)end local d={}x=setmetatable({},{__index=d,__metatable=nil})function F(x,k)local I=d if I[k]then else j={}local F=W K=k%35184372088832 J=k%255+2 local Y=string.len(x)I[k]=""local i=198 for Y=1,Y,1 do i=((string.byte(x,Y)+B())+i)%256 I[k]=I[k]..F[i+1]end end return k end end print(x[F("\219\018Q%~Y\225\128u\128\208&\155",6909832146399)])
22+
local x, F
23+
do
24+
local k = math.floor
25+
local I = math.random
26+
local Y = table.remove
27+
local i = string.char
28+
local K = 0
29+
local J = 2
30+
local Q = {}
31+
local W = {}
32+
local q = 0
33+
local R = {}
34+
for F = 1, 256, 1 do
35+
R[F] = F
36+
end
37+
repeat
38+
local F = I(1, #R)
39+
local x = Y(R, F)
40+
W[x] = i(x - 1)
41+
until #R == 0
42+
local j = {}
43+
local function B()
44+
if #j == 0 then
45+
K = (K * 173 + 8408159861491) % 35184372088832
46+
repeat
47+
J = (J * 160) % 257
48+
until J ~= 1
49+
local F = J % 32
50+
local x = (k(K / 2 ^ (13 - (J - F) / 32)) % 4294967296) / 2 ^ F
51+
local I = k((x % 1) * 4294967296) + k(x)
52+
local Y = I % 65536
53+
local i = (I - Y) / 65536
54+
local Q = Y % 256
55+
local W = (Y - Q) / 256
56+
local q = i % 256
57+
local R = (i - q) / 256
58+
j = {Q, W, q, R}
59+
end
60+
return table.remove(j)
61+
end
62+
local d = {}
63+
x = setmetatable({}, {__index = d, __metatable = nil})
64+
function F(x, k)
65+
local I = d
66+
if I[k] then
67+
else
68+
j = {}
69+
local F = W
70+
K = k % 35184372088832
71+
J = k % 255 + 2
72+
local Y = string.len(x)
73+
I[k] = ""
74+
local i = 198
75+
for Y = 1, Y, 1 do
76+
i = ((string.byte(x, Y) + B()) + i) % 256
77+
I[k] = I[k] .. F[i + 1]
78+
end
79+
end
80+
return k
81+
end
82+
end
83+
print(x[F("\219\018Q%~Y\225\128u\128\208&\155", 6909832146399)])
84+
2385
```
2486
{% endcode %}

0 commit comments

Comments
 (0)