Implementation of hash.h