some updated scripts

This commit is contained in:
iceman1001 2017-07-04 20:05:50 +02:00
commit fa8da9e651
6 changed files with 55 additions and 19 deletions

View file

@ -140,7 +140,7 @@ local Utils =
------------ CRC-64 ecma checksums
-- Takes a hex string and calculates a crc64 ecma
-- Takes a hex string and calculates a crc64 ecma hash
Crc64 = function(s)
if s == nil then return nil end
if #s == 0 then return nil end
@ -152,6 +152,19 @@ local Utils =
end
return nil
end,
------------ CRC-64 ecma 182 checksums
-- Takes a hex string and calculates a crc64 ecma182 hash
Crc64_ecma182 = function(s)
if s == nil then return nil end
if #s == 0 then return nil end
if type(s) == 'string' then
local utils = require('utils')
local asc = utils.ConvertHexToAscii(s)
local hash = core.crc64_ecma182(asc)
return hash
end
return nil
end,
------------ SHA1 hash
-- Takes a string and calculates a SHA1 hash