Fix almost everything #8
@ -1,6 +1,6 @@
|
|||||||
local md5 = {
|
local md5 = {
|
||||||
_VERSION = "md5.lua 0.5.0",
|
_VERSION = "md5.lua 1.0.0",
|
||||||
_DESCRIPTION = "MD5 computation in Lua (5.1)",
|
_DESCRIPTION = "MD5 computation in Lua (5.1-3, LuaJIT)",
|
||||||
_URL = "https://github.com/kikito/md5.lua",
|
_URL = "https://github.com/kikito/md5.lua",
|
||||||
_LICENSE = [[
|
_LICENSE = [[
|
||||||
MIT LICENSE
|
MIT LICENSE
|
||||||
@ -35,8 +35,8 @@ local char, byte, format, rep, sub =
|
|||||||
string.char, string.byte, string.format, string.rep, string.sub
|
string.char, string.byte, string.format, string.rep, string.sub
|
||||||
local bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift
|
local bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift
|
||||||
|
|
||||||
local ok, bit = pcall(require, "bit")
|
local ok, bit = pcall(require, 'bit')
|
||||||
if not ok then ok, bit = pcall(require, "bit32") end
|
if not ok then ok, bit = pcall(require, 'bit32') end
|
||||||
|
|
||||||
if ok then
|
if ok then
|
||||||
bit_or, bit_and, bit_not, bit_xor = bit.bor, bit.band, bit.bnot, bit.bxor
|
bit_or, bit_and, bit_not, bit_xor = bit.bor, bit.band, bit.bnot, bit.bxor
|
||||||
|
Reference in New Issue
Block a user