Bifid cipher: Difference between revisions
Content deleted Content added
Line 921: | Line 921: | ||
s = xStr .. yStr |
s = xStr .. yStr |
||
end |
end |
||
local |
local result, x, y = "" |
||
local limit = decipher and #s/2 or #s |
local limit = decipher and #s/2 or #s |
||
local step = decipher and 1 or 2 |
local step = decipher and 1 or 2 |
||
Line 929: | Line 929: | ||
tonumber(s:sub(pos + #s/2, pos + #s/2)) or |
tonumber(s:sub(pos + #s/2, pos + #s/2)) or |
||
tonumber(s:sub(pos + 1, pos + 1)) |
tonumber(s:sub(pos + 1, pos + 1)) |
||
result = result .. cipher[x][y] |
|||
end |
end |
||
return |
return result |
||
end |
end |
||