* 测试代码
This commit is contained in:
@@ -151,7 +151,12 @@ namespace dl
|
||||
.addFunction("print", lua_print)
|
||||
.addFunction("print_ex", lua_print_ex)
|
||||
.addFunction("delete", lua_delete)
|
||||
.addFunction("to_string", lua_to_string);
|
||||
.addFunction("to_string", lua_to_string)
|
||||
.addFunction("to_string_hex",
|
||||
+[](BufferView buf) { return to_string_hex(buf); },
|
||||
+[](BufferView buf, bool upper) { return to_string_hex(buf, upper); },
|
||||
+[](BufferView buf, bool upper, bool add_tag) { return to_string_hex(buf, upper, add_tag); }
|
||||
);
|
||||
|
||||
|
||||
luabridge::getGlobalNamespace(L)
|
||||
|
||||
@@ -8,8 +8,8 @@ local path_key = path_src .. "key.json"
|
||||
if File.IsExist(path_key) then
|
||||
local key = Crypto.GenerateKeyAes256()
|
||||
local j = {}
|
||||
j["key"] = to_string(key._key)
|
||||
j["iv"] = to_string(key._iv)
|
||||
j["key"] = to_string_hex(key._key)
|
||||
j["iv"] = to_string_hex(key._iv, true)
|
||||
j["tag"] = to_string(key._tag)
|
||||
|
||||
-- test json
|
||||
|
||||
Reference in New Issue
Block a user