mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
some updated scripts
This commit is contained in:
parent
1d02d17828
commit
fa8da9e651
6 changed files with 55 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue