# Double Hashing with Strings as key

How would you choose the second hash function with for double hashing with string as key? My first hash function is the scalar product of a random int array with the 16 bit number of each char. Is that a good first hash function? And what should I do for the second function now? hanks in advance.

• @bukujuku, assuming you're working modulo $2^n$ (e.g., $2^{32}$) rather than modulo a prime, choose random odd numbers.