To expand just a little on what KarstenK wrote, let's start with the prototype he showed :
HASH hash(void* data, int byteSize);
Here is a simple hash function that could be implemented using that prototype.
using HASH = long long int;
using UCHAR = unsigned char;
HASH hash( void * data, int byteSize )
{
HASH hv = 0x0030507; UCHAR * pd = (UCHAR *) data;
for( int n = 0; n < byteSize; ++n )
{
hv << 4;
hv += pd[ n ];
}
return hv;
}
I won't claim that is a good hash function but it is a simple one that illustrates how they are sometimes implemented. A test of a hash function would be to throw a whole bunch of possible input values at it and then see how many collisions result and how the bucket distribution looks. Ideally there are few collisions and the buckets have roughly the same occupancy.