Effective ways to find partial sha1 collision
Choosing two strings, hashing them, and comparing the first 8 hex characters of the hash should produce a match once every 2^32 iterations.  The question implies that the values for x for the match aren't required to be the same, so your approach is much too restrictive.  You need to compare the hash you just generated with all of the previous hashes.  If you use a Dictionary&lt;String, String&gt; or similar to store previous results, you can expect a collision after 2^16 elements.

Coding-wise, your byte-to-string conversion can be made more efficient (you do work that is discarded).  You might consider just returning 8 bytes and writing a comparitor for that.