hash function for reference;

This commit is contained in:
Alexander Vdolainen 2021-03-20 14:28:17 +02:00
parent 573e0a9eaa
commit 3c9528bb0a

@ -20,7 +20,21 @@
#include <stdio.h>
#include <eport.h>
unsigned long djb_hash(const char *s)
{
unsigned long hash = 5381;
int c;
while((c = *s++))
hash = ((hash << 5) + hash) + c;
return hash;
}
int main(int argc, char **argv)
{
return 0;
}