diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luamd5/md5.lua')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luamd5/md5.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luamd5/md5.lua b/Build/source/texk/web2c/luatexdir/luamd5/md5.lua new file mode 100644 index 00000000000..0e0c4912dd9 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luamd5/md5.lua @@ -0,0 +1,22 @@ +-- md5.lua +-- (you should put this file in any directory of your LUA_PATH) + + +-- change the next line to point to the md5 dynamic library + +-- local path = "/usr/local/lua/lib/libmd5.so" +--local path = "./libmd5.so" + +--assert(loadlib(path, "luaopen_md5"))() + + +-- Returns the md5 hash value as a string of hexadecimal digits + +function md5.sumhexa (k) + k = md5.sum(k) + return (string.gsub(k, ".", function (c) + return string.format("%02x", string.byte(c)) + end)) +end + +return md5 |