How To Call It
Crypto is a singleton global table: call its functions with a dot (Crypto.<method>(...)).
Digests (MD5, SHA), HMAC signatures, Base64/hex encoding, secure random values and constant-time comparison. Digests return hex strings; there is no encryption such as AES.
Documented for app version 1.0.51Updated:
Crypto is a singleton global table: call its functions with a dot (Crypto.<method>(...)).
In security and licensing flow, re-check the result at critical checkpoints instead of trusting a single early validation.
Crypto offers 18 methods; each method page lists its parameters and return value.
When paired with License and Runtime/System checks, it gives you stronger premium, trial, and security decisions.
The snippet below is a starter pattern that can be applied directly in runtime flow.
local signature = Crypto.hmacSha256("shared-secret", "payload")
local ok = Crypto.constantTimeEquals(signature, signature)From foundation to combined usage, each level is provided as a separate code block so you can copy the level you need and adapt it directly.
local signature = Crypto.hmacSha256("shared-secret", "payload")
local ok = Crypto.constantTimeEquals(signature, signature)local signature = Crypto.hmacSha256("shared-secret", "payload")
local ok = Crypto.constantTimeEquals(signature, signature)
-- Continue with one focused method on the object.local signature = Crypto.hmacSha256("shared-secret", "payload")
local ok = Crypto.constantTimeEquals(signature, signature)
local note = "Crypto overview loaded"
print(note)-- In security and licensing flow, re-check the result at critical checkpoints instead of trusting a single early validation.
local function run_crypto_step()
local signature = Crypto.hmacSha256("shared-secret", "payload")
local ok = Crypto.constantTimeEquals(signature, signature)
end
local ok, err = pcall(run_crypto_step)
if not ok then
toast("Step failed")
print(err)
endlocal signature = Crypto.hmacSha256("shared-secret", "payload")
local ok = Crypto.constantTimeEquals(signature, signature)
wait(200)
print("Combined with logging and flow control")