cladhaire
public text v1 · immutablelocal CRC_LIMIT = tonumber("FFFF", 16)
function CheckSum(text)
local counter = 1
for i=1,string.len(text) do
counter = counter + ((string.byte(string.sub(text, i, i))) * i * 17)
end
counter = math.mod(counter, CRC_LIMIT)
return string.format("%x", counter)
end