There are a number of existing hashtable implementations for C, from the C standard library hcreate/hdestroy/hsearch, to those in the APR and glib, which also provide prebuilt hash functions. I'd highly recommend using those rather than inventing your own hashtable or hash function; they've been optimized heavily for common use-cases.
More specifically, I'm particularly interested in the following special case. Define a hash function $\H$ by truncating the output of $\SHA$ to $128$ bits, i.e.,
May 24, 2013 · Constants can be applied to variables, function parameters and functions themselves. In this tutorial, we are going to talk about hash tables, specifically the STL unordered_map. I like to think of hash tables as a more general form of an array. Arrays are indexed by small integers, whereas hash tables can be indexed by anything. Code
The actual hash functions are implementation-dependent and are not required to fulfill any other quality criteria except those specified above. Notably, some implementations use trivial (identity) hash functions which map an integer to itself.