r757: use complex hash function

Recent changes are mostly for accelerating error correction.