Use a table & table.concat instead of individual concats. And then use that same table for every hash-related operation. (Nothing else uses the configurable hash function, otherwise I'd have limited the table shenanigans to the function itself).
pairs