Universal hash function.