ADD: tnp3.lua can now validate the checkums in the dump

ADD: added  CRC16 CCITT functionality to LUA
FIX: tnp3.lua is now correctly decryping data while dumping
This commit is contained in:
iceman1001 2014-11-12 23:18:46 +01:00
commit 47cbb2d418
5 changed files with 114 additions and 13 deletions

View file

@ -86,6 +86,15 @@ local Utils =
end
return t
end,
ConvertHexToAscii = function(s)
local t={}
if s == nil then return t end
if #s == 0 then return t end
for k in s:gmatch"(%x%x)" do
table.insert(t, string.char(tonumber(k,16)))
end
return table.concat(t)
end,
-- function convertStringToBytes(str)
-- local bytes = {}