I\'m implementing universal hashing and using the following universal hash function :
h(k)=((A*k)mod 2^64) rsh 64-r
where A is a
((long long)rand() << 32) | rand()
EDIT: that's assuming that rand() produces 32 random bits, which it might not.