lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> With code having lots of bitops, I'd probably do things like
> 
>   local OR = bit.bor or bit32.OR  -- prefer JIT-optimized ops
>   local AND = bit.band or bit32.AND
>   local NOT = bit.bnot or bit32.NOT
>   ...
>   if not t or NOT(OR(x,y)) == 1 and AND(z,w) == 0 then ... end

For real code by Roberto, see http://lua-users.org/wiki/SecureHashAlgorithm