Files
dl/project/dl_console/res/解密(AES-256).lua
2026-09-16 14:07:40 +08:00

28 lines
737 B
Lua

local path_src = File.GetAbsolute("./src/")
local path_out = File.GetAbsolute("./out/")
-- 创建输出目录
File.CreateFolder(path_out)
local path_key = path_src .. "key.json"
if not File.IsExist(path_key) then
print("密钥文件不存在:"..path_key)
return
end
local str = File.GetString(path_src .. "key.json")
local j = json.decode(str)
local key = Crypto.Aes256Key()
key._key = CreateBufferHex(j.key)
key._iv = CreateBufferHex(j.iv)
key._tag = CreateBufferHex(j.tag)
local out = Crypto.DecryptAes256(File.GetBuffer(path_src .. "apple.aes256"), key)
File.SaveBuffer(out, path_out .. "apple.png")
-- print(param._src.."->"..param._out)
print "此工具会将src文件夹的apple.aes256解密为 apple.png"
pause()