srijs/rusha — pull request #4 by edwintorok (2013-04-03 20:49:12+00:00)
Title: Fix padlen (i.e. fix Rusha for length%64 == 55)

Rusha is giving wrong results when length is 55.
For example a buffer full of zeroes of length 55:

Rusha hash mismatch on size 55: cc8562dd082fad5ad46646b2737be76d6eefd836 expected: 8e8832c642a6a38c74c17fc92ccedc266c108e6c

I have confirmed that 8e8832c642a6a38c74c17fc92ccedc266c108e6c is the good expected hash:

$ dd if=/dev/zero bs=55 count=1 2>/dev/null|sha1sum -
8e8832c642a6a38c74c17fc92ccedc266c108e6c -

The 2 commits in this pull request:
- add a test with various buffer sizes to detect these kind of bugs
- fixes the bug in padlen