MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hash32_buf

Function hash32_buf

freebsd/sys/hash.h:46–55  ·  view source on GitHub ↗

* Return a 32-bit hash of the given buffer. The init * value should be 0, or the previous hash value to extend * the previous hash. */

Source from the content-addressed store, hash-verified

44 * the previous hash.
45 */
46static __inline uint32_t
47hash32_buf(const void *buf, size_t len, uint32_t hash)
48{
49 const unsigned char *p = buf;
50
51 while (len--)
52 hash = HASHSTEP(hash, *p++);
53
54 return hash;
55}
56
57/*
58 * Return a 32-bit hash of the given string.

Callers 6

hash_table_valueFunction · 0.85
siftr.cFile · 0.85
hash_pktFunction · 0.85
stats_tpl_update_hashFunction · 0.85
bt_hashheadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected