Implement rehashing for Hash