unsigned int DJBHash(const std::string& str)
{
unsigned int hash = 5381;

for(std::size_t i = 0; i < str.length(); i++)
{
hash = ((hash << 5) + hash) + str[i];
}

return hash;
}

unsigned int BKDRHash(const std::string& str)
{
unsigned int seed = 31; // 31 131 1313 13131 131313 etc..
unsigned int hash = 0;

for(std::size_t i = 0; i < str.length(); i++)
{
hash = (hash * seed) + str[i];
}

return (hash & 0x7FFFFFFF);
}

unsigned int SDBMHash(const std::string& str)
{
unsigned int hash = 0;

for(std::size_t i = 0; i < str.length(); i++)
{
hash = str[i] + (hash << 6) + (hash << 16) - hash;
}

return (hash & 0x7FFFFFFF);
}

unsigned int APHash(const std::string& str)
{
unsigned int hash = 0;

for(std::size_t i = 0; i < str.length(); i++)
{
hash ^= ((i & 1) == 0) ? ( (hash << 7) ^ str[i] ^ (hash >> 3)) :
(~((hash << 11) ^ str[i] ^ (hash >> 5)));
}

return (hash & 0x7FFFFFFF);
}