Update hash.hpp

Fixed quadratic hashing