cache: make hashcmp and hasheq work with larger hashes