[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Trouble with sha1 and bitlib
- From: Choonster TheMage <choonster.2010@...>
- Date: Sun, 14 Apr 2013 08:00:37 +1000
I'm currently modifying a pure Lua sha1 and hmac_sha1 library I found
a while back to use existing bitwise library functions instead of
its pure Lua versions when possible.
All of the bitwise arithmetic tests at the end of the file pass on all
of the platforms I tested, except for the ones that print "nullop"
followed by a series of zeroes (those tests aren't supported by all
three bitwise libraries).
Three of the four platforms pass all the validation tests, but for
some reason Lua 5.1.5 with bitlib fails on the first one if bitlib's
functions are used instead of the pure Lua equivalents (which pass all
Would anyone with 5.1.5 and bitlib be willing to test the code and/or
point out any obvious errors on my part? It can be run directly from
the command line or with dofile.
 I've tested it on Lua 5.1.4 with Lua BitOp from LuaForWindows,
Lua 5.1.5 with bitlib from the LuaDist repo, LuaJIT 2.0.1 with
built-in Lua BitOp and Lua 5.2.2 with built-in bit32