Make sure `hash` function won't break after eons of usage

Previously, increasing the prefix indefinitely would eventually make the function incorrect since `Math.pow(10, 16) === (Math.pow(10, 16) + 1)` in JavaScript, due to all numbers being floating point numbers. This wasn't likely to happen in real life, 10^16 is quite a lot, but now I can sleep better at night ;)