Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Converting text with string.byte multiple times but still work?

Asked by 7 years ago

(Yet another failed attempt to clearly explain what my question is. ._.)

I'm trying to encrypt an ID simply by using string.byte but I wanna convert it into byte code multiple times but still work when I run the script.

So a friend showed me this script to convert entire text into byte code:

local strng='747337591'
local numbers={}
for n in strng:gmatch'.'do
table.insert(numbers,n:byte())
end

print(unpack(numbers))

and I wanna implement this so when I run the script multiple times with that script it'll run through properly, an example:

print'\55\50\49\48\49\49\48\56\49\48\56\49\49\49'
--[[
Wanted output: '\72\101\108\108\111'
Outputs: '72101108108111'
--]]

--Continuing for the wanted output:
print'\72\101\108\108\111'

--Outputs: 'Hello'

Is there any way to do this or am I just crazy?

0
This is encoding not encryption. User#5423 17 — 7y

Answer this question