local g={}local N={}for N=65,90,1 do table.insert(g,N)end for N=97,122,1 do table.insert(g,N)end for N=48,57,1 do table.insert(g,N)end table.insert(g,43)table.insert(g,47)for g,f in ipairs(g)do N[f]=g end local f={ClassName="\066\097\115\101\054\052";__tostring=function(g)return g.ClassName end}f.__index=f local j=bit32.rshift local P=bit32.lshift local r=bit32.band function f.new()return setmetatable({},f)end
--[[
	
	local base64 = Base64.new()
	
	Example:
	
	local myEncodedWord = base64:Encode("Hello")
	
	print(myEncodedWord)
	
	-- outputs: SGVsbG8=
	
	print(base64:Decode(myEncodedWord))
	
	-- outputs: Hello

--]]

local Alphabet = {}
local Indexes = {}

for Index = 65, 90 do
	table.insert(Alphabet, Index)
end -- A-Z
for Index = 97, 122 do
	table.insert(Alphabet, Index)
end -- a-z
for Index = 48, 57 do
	table.insert(Alphabet, Index)
end -- 0-9

table.insert(Alphabet, 43) -- +
table.insert(Alphabet, 47) -- /

for Index, Character in ipairs(Alphabet) do
	Indexes[Character] = Index
end

local Base64 = {
	ClassName = "Base64",
	__tostring = function(self)
		return self.ClassName
	end,
}

Base64.__index = Base64

local bit32_rshift = bit32.rshift
local bit32_lshift = bit32.lshift
local bit32_band = bit32.band

function Base64.new()
	return setmetatable({}, Base64)
end
