Skip to content

Commit

Permalink
fix sha1 integer overflow problem #31
Browse files Browse the repository at this point in the history
  • Loading branch information
lipp committed Apr 17, 2014
1 parent a74815c commit 8c70f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/websocket/tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ local sha1 = function(msg)
h3 = band(h3,0xffffffff)
h4 = band(h4,0xffffffff)

return spack('>I>I>I>I>I',h0,h1,h2,h3,h4)
return spack('>i>i>i>i>i',h0,h1,h2,h3,h4)
end

local base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
Expand Down

0 comments on commit 8c70f5e

Please sign in to comment.