函数:aes128_decrypt AES128 解码

函数名称:AES128 解码

函数功能:字符串 AES128 解码(模式为 ECB)

函数方法

msg = tmp:aes128_decrypt(key)

参数 类型 必填 说明
tmp string 需要解码的内容
key string 密匙
参数 类型 说明
msg string 解码后的内容

函数用例

local ts = require("ts")
local msg = "\5\4\3\2\1\0"
local key = "触动精灵"
local emsg = msg:aes128_encrypt(key)
local emsgb64 = emsg:base64_encode()
local tmp = emsgb64:base64_decode()
msg = tmp:aes128_decrypt(key)
dialog('"'..emsgb64..'"  \n使用 AES128 算法 密钥 "'..key..'" 解码值是 <'..msg:tohex()..'>', 0)

注意事项

  • 在线加密/解密网址:http://tool.chacuo.net/cryptaes

  • 加密模式:ECB

  • 填充:pkcs7padding

  • 数据块:128位

  • 偏移量:空

  • 输出:base64

  • 字符集:utf8编码

Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""