函数:md5 计算 MD5

函数名称:计算 MD5

函数功能:字符串 MD5 计算

函数方法

str2 = str1:md5()

参数 类型 必填 说明
str1 string 需要计算的内容
返回值 类型 说明
str2 string 计算后的 md5 值

函数用例

local ts = require("ts")
local str = "触动精灵"
local binstr = "\0\1\2\3\4\5"
dialog('"'..str..'" 的 MD5 值是: '..str:md5(), 0)--计算"触动精灵"的 MD5 值
dialog('<'..binstr:tohex()..'> 的 MD5 值是: '..binstr:md5(), 0)--计算“000102030405”的 MD5 值
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""