some updated scripts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user