mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2024-08-21 13:44:11 +02:00
renames variables to avoid luacheck errors
This commit is contained in:
parent
1f6eba9a7b
commit
51347acd88
8
md5.lua
8
md5.lua
@ -268,8 +268,8 @@ local f=function (x,y,z) return bit_or(bit_and(x,y),bit_and(-x-1,z)) end
|
|||||||
local g=function (x,y,z) return bit_or(bit_and(x,z),bit_and(y,-z-1)) end
|
local g=function (x,y,z) return bit_or(bit_and(x,z),bit_and(y,-z-1)) end
|
||||||
local h=function (x,y,z) return bit_xor(x,bit_xor(y,z)) end
|
local h=function (x,y,z) return bit_xor(x,bit_xor(y,z)) end
|
||||||
local i=function (x,y,z) return bit_xor(y,bit_or(x,-z-1)) end
|
local i=function (x,y,z) return bit_xor(y,bit_or(x,-z-1)) end
|
||||||
local z=function (f,a,b,c,d,x,s,ac)
|
local z=function (ff,a,b,c,d,x,s,ac)
|
||||||
a=bit_and(a+f(b,c,d)+x+ac,0xFFFFFFFF)
|
a=bit_and(a+ff(b,c,d)+x+ac,0xFFFFFFFF)
|
||||||
-- be *very* careful that left shift does not cause rounding!
|
-- be *very* careful that left shift does not cause rounding!
|
||||||
return bit_or(bit_lshift(bit_and(a,bit_rshift(0xFFFFFFFF,s)),s),bit_rshift(a,32-s))+b
|
return bit_or(bit_lshift(bit_and(a,bit_rshift(0xFFFFFFFF,s)),s),bit_rshift(a,32-s))+b
|
||||||
end
|
end
|
||||||
@ -366,8 +366,8 @@ function md5.sumhexa(s)
|
|||||||
local t = CONSTS
|
local t = CONSTS
|
||||||
local a,b,c,d = t[65],t[66],t[67],t[68]
|
local a,b,c,d = t[65],t[66],t[67],t[68]
|
||||||
|
|
||||||
for i=1,#s,64 do
|
for ii=1,#s,64 do
|
||||||
local X = cut_le_str(sub(s,i,i+63),4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)
|
local X = cut_le_str(sub(s,ii,ii+63),4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4)
|
||||||
assert(#X == 16)
|
assert(#X == 16)
|
||||||
X[0] = table.remove(X,1) -- zero based!
|
X[0] = table.remove(X,1) -- zero based!
|
||||||
a,b,c,d = transform(a,b,c,d,X)
|
a,b,c,d = transform(a,b,c,d,X)
|
||||||
|
Loading…
Reference in New Issue
Block a user