Fix sha1 call to actually do something

Since a very early revision, the call to sha1_buffer() used a buffer length
argument of '0' (where obviously it should have been 20), because of which the
function would always return the same hash. As we have not previously looked at
the actual return values of the function, we hadn't noticed this before.
Fix main loop to check starting SHA too

The previously used structure of the main loop would increment the input value
before checking it, which would always skip the starting SHA. While this was not
a problem for starting at 0 (of which we know it is not a fixpoint), it would
have been easy to overlook certain SHAs when starting at other ranges.