Git - code.swisschili.sh
code.swisschili.sh
/
6502
/
ca0d2e2f773470994ff7e1807a379e6289cb7713
/
.
/
as
/
hash.c
blob: df4fec070f80bb293f0517a4acbe66367d538e3d [
file
] [
log
] [
blame
]
#include
"hash.h"
uint32_t
hash
(
char
*
str
)
{
uint32_t
hash
=
5381
;
char
c
;
while
(
c
=
*
str
++)
{
hash
=
(
hash
<<
5
)
+
hash
+
c
;
}
return
hash
;
}