six hash function