Lines Matching refs:hash
27 * $OpenBSD: hash.h,v 1.4 2004/05/25 18:37:23 jmc Exp $
41 * Return a 32-bit hash of the given buffer. The init
42 * value should be 0, or the previous hash value to extend
43 * the previous hash.
46 hash32_buf(const void *buf, size_t len, uint32_t hash)
51 hash = HASHSTEP(hash, *p++);
53 return hash;
57 * Return a 32-bit hash of the given string.
60 hash32_str(const void *buf, uint32_t hash)
65 hash = HASHSTEP(hash, *p++);
67 return hash;
71 * Return a 32-bit hash of the given string, limited by N.
74 hash32_strn(const void *buf, size_t len, uint32_t hash)
79 hash = HASHSTEP(hash, *p++);
81 return hash;
85 * Return a 32-bit hash of the given string terminated by C,
90 hash32_stre(const void *buf, int end, const char **ep, uint32_t hash)
95 hash = HASHSTEP(hash, *p++);
100 return hash;
104 * Return a 32-bit hash of the given string, limited by N,
110 uint32_t hash)
115 hash = HASHSTEP(hash, *p++);
120 return hash;