hash: modified Rabin-Karp

We are ensuring that all bytes in the hash will be multiplied by the
constant. This way the last byte will affect all bits of the hash in
every case.