Did you know why or how to solve it?
another way, when I downloaded it into a folder then use it like below
local String = require("string");
local Array = require("lockbox.util.array");
local Stream = require("lockbox.util.stream");
local ECBMode = require("lockbox.cipher.mode.ecb");
local CBCMode = require("lockbox.cipher.mode.cbc");
local CFBMode = require("lockbox.cipher.mode.cfb");
local OFBMode = require("lockbox.cipher.mode.ofb");
local CTRMode = require("lockbox.cipher.mode.ctr");
local IGEMode = require("lockbox.cipher.mode.ige");
local PKCS7Padding = require("lockbox.padding.pkcs7");
local ZeroPadding = require("lockbox.padding.zero");
local AES128Cipher = require("lockbox.cipher.aes128");
local M = {}
and what i see that it works well on win32, but when running html5 or android, i got the error
If you meet it before or know how to solve it. please let me know
thanks for your reply
I am already cut lockbox and put in the root( image below). and I can run it normally on win32 and build successfully on html5 and Android, but when running html5/android build, it shows the error
Lockbox = require("lockbox.init")
Lockbox.ALLOW_INSECURE = true
local String = require("string");
local Array = require("lockbox.util.array");
local Stream = require("lockbox.util.stream");
local ECBMode = require("lockbox.cipher.mode.ecb");
local CBCMode = require("lockbox.cipher.mode.cbc");
local CFBMode = require("lockbox.cipher.mode.cfb");
local OFBMode = require("lockbox.cipher.mode.ofb");
local CTRMode = require("lockbox.cipher.mode.ctr");
local IGEMode = require("lockbox.cipher.mode.ige");
local PKCS7Padding = require("lockbox.padding.pkcs7");
local ZeroPadding = require("lockbox.padding.zero");
local AES128Cipher = require("lockbox.cipher.aes128");
local M = {}
M.encrypt = function()
local cipher = ECBMode.Cipher()
.setKey( Array.fromHex("2b7e151628aed2a6abf7158809cf4f3c"))
.setBlockCipher(AES128Cipher)
.setPadding(ZeroPadding);
local cipherOutput = cipher
.init()
.update(Stream.fromArray( Array.fromHex("")))
.update(Stream.fromArray(Array.fromHex("6bc1bee22e409f96e93d7e117393172a")))
.finish()
.asHex();
print(cipherOutput)
return cipherOutput
end
return M
I managed that bug
that bug happens when in the source code has “;” symbol at end of a line(maybe devs wrote lockbox lib is a c++ developer )
‘;’ symbol makes Defold can not compile *.Lua file to *.luac
I just removed that symbol and it works
thanks