Create hash function and subsequent tests