in reply to Quick and Dirty Hash
The problem you're experiencing is that you aren't mixing up your bits enough. With a simple multiply-accumulate, you'll find that you're not distributing your results evenly through the result space, so similar sequences tend to result in similar values.
You may want to try one of the CRC (or similar) algorithms which are designed for error-checking and try to spread the values around. (See also Hash functions, Error detection, Data Integrity)
--roboticus
|
|---|