blob: ca52f262f8529b3ecb0131cc1e8eb8a982204ee1 (
plain)
1
2
3
4
5
6
7
8
9
10
|
#include "nhash.h"
#include "../lookup3.h"
uint32_t nhash(const void *key, size_t length, uint32_t initval)
{
/* WSPR table indices use 15 bits; empty keys historically bypass the mask. */
uint32_t hash = wsjt_hashlittle(key, length, initval);
return length == 0 ? hash : hash & (uint32_t)0x7fff;
}
|