diff --git a/modules/lib/sha256.lua b/modules/lib/sha256.lua index a794a28..0d776da 100644 --- a/modules/lib/sha256.lua +++ b/modules/lib/sha256.lua @@ -6,8 +6,9 @@ -- Found Here: https://bitbucket.org/Boolsheet/bslf/src/1ee664885805/bit.lua -- -- Data card support added by https://github.com/SuPeRMiNoR2 -sha = {} -if component.data then +_G.sha = {} +if component then + if component.data then datac = component.data function sha.sha256(data) local d=component.data.sha256(data) @@ -15,6 +16,7 @@ if component.data then return string.format("%02x", string.byte(c)) end)) end + end else local MOD = 2^32 local MODM = MOD-1