blob: df4fec070f80bb293f0517a4acbe66367d538e3d [file] [log] [blame]
swissChilica0d2e22020-08-16 15:09:25 -07001#include "hash.h"
2
3uint32_t hash(char *str)
4{
5 uint32_t hash = 5381;
6 char c;
7
8 while (c = *str++)
9 {
10 hash = (hash << 5) + hash + c;
11 }
12
13 return hash;
14}