+ ----ISO14443-B CRC\r
+ Crc14b = function(s)\r
+ if s == nil then return nil end\r
+ if #s == 0 then return nil end\r
+ if type(s) == 'string' then\r
+ local utils = require('utils')\r
+ return utils.ConvertAsciiToHex(\r
+ core.iso14443b_crc(s)\r
+ )\r
+ end\r
+ return nil \r
+ end,\r
+ \r
+ ------------ CRC-8 Legic checksums\r
+ -- Takes a hex string and calculates a crc8\r
+ Crc8Legic = function(s)\r
+ if s == nil then return nil end\r
+ if #s == 0 then return nil end\r
+ if type(s) == 'string' then\r
+ local utils = require('utils')\r
+ local asc = utils.ConvertHexToAscii(s)\r
+ local hash = core.crc8legic(asc)\r
+ return hash\r
+ end\r
+ return nil\r
+ end,\r