Berkeley DB Reference Guide: Access Methods
Google

ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++">

Berkeley DB Reference Guide: Access Methods

Specifying your own hashing function (h_hash)

The hash function for the hash table can be specified as part of the db_open call to open the database, specifically by setting the h_hash element of the DB_INFO structure. If no hash function is specified, a default function will be used.

Since no hash function performs equally well on all possible data, it is possible that applications may find that the default hash function performs poorly with a particular data set.

Any application-specified hash function must take a pointer to a byte string and a length as arguments and return an unsigned, 32-bit hash value.