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.
There are many hash functions for hashing a string; a web search should turn up a bunch. You can use any one you like. The fact that you are using double hashing doesn't impose any additional requirements on the hash function. Yes, that would be a reasonable hash (and you could use two different int arrays for the two different hash functions); there are many other choices that would be reasonable as well.