kikito / md5.lua

MD5 sum in pure Lua, with no C and no external dependencies
MIT License
326 stars 151 forks source link

does not work with lnum patch #5

Closed Nossiac closed 9 years ago

Nossiac commented 9 years ago

this library does not work with lnum patch. (i'm work with lua 5.1.5 + lnum patch)

lua: /usr/lib/lua/md5.lua:376: bad argument #2 to 'format' (integer expected, got number)
stack traceback:
    [C]: in function 'format'
    /usr/lib/lua/md5.lua:376: in function 'sumhexa'
    /usr/lib/lua/md5.lua:380: in function 'sum'

similar error reported here, http://lua-users.org/lists/lua-l/2012-08/msg00170.html . i tried the workaround, but no luck....

kikito commented 9 years ago

I don't have that patch, and have no particular need for it. I can't develop this myself. If you want, please feel free to send me a pull request, I can review and eventually accept it (provided that it does not break the unpatched version).

I must also warn you that the Lua 5.1 implementation fails for big strings (files bigger than some KBs). If you need it for that, I would recommend looking at other places (for example invoking an external tool, or updating to LuaJIT or Lua 5.2)

For now, I am closing this issue (but please send a pull request if you can)