2 /* gcc -O3 -o djb2 djb2.c */
7 static uint32_t djb2(const char* str)
9 const unsigned char* aux = (const unsigned char*)str;
13 hash = (hash << 5) + hash + *aux++;
18 int main(int argc, const char* argv[])
22 for (i = 1; i < argc; i++)
23 printf( "0x%08xU: %s\n", djb2( argv[ i ] ), argv[ i ] );