made sha256.lua work with ocemu
This commit is contained in:
parent
ecba456ef6
commit
af2ce42583
@ -8,14 +8,17 @@
|
||||
-- Data card support added by https://github.com/SuPeRMiNoR2
|
||||
_G.sha = {}
|
||||
if component then
|
||||
if component.data then
|
||||
datac = component.data
|
||||
function sha.sha256(data)
|
||||
local d=component.data.sha256(data)
|
||||
return (d:gsub('.',function(c)
|
||||
return string.format("%02x", string.byte(c))
|
||||
end))
|
||||
end
|
||||
if component.data and not component.ocemu then
|
||||
shamode = "hardware"
|
||||
end
|
||||
end
|
||||
if shamode == "hardware" then
|
||||
datac = component.data
|
||||
function sha.sha256(data)
|
||||
local d=component.data.sha256(data)
|
||||
return (d:gsub('.',function(c)
|
||||
return string.format("%02x", string.byte(c))
|
||||
end))
|
||||
end
|
||||
else
|
||||
local MOD = 2^32
|
||||
|
Loading…
Reference in New Issue
Block a user