Tente:
#include <linux/jhash.h>
e use esta função:
/*
* jhash - hash an arbitrary key
* @k: sequence of bytes as key
* @length: the length of the key
* @initval: the previous hash, or an arbitray value
*
* The generic version, hashes an arbitrary sequence of bytes.
* No alignment or length assumptions are made about the input key.
* Returns the hash value of the key. The result depends on endianness.
*/
u32 jhash(const void *key, u32 length, u32 initval);