Extract the string hash function into a separate file.