diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-11-27 03:24:24 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-11-29 23:57:56 +0100 |
commit | 4e2d5a81bb2834f7393e9847bfa091f8a0a07556 (patch) | |
tree | 87eb878db4a269948a39566f14be9315733f5919 /libihash/ihash.h | |
parent | 1842a9dcd1056dac886e96071e8c5dcd2859d471 (diff) | |
download | hurd-4e2d5a81bb2834f7393e9847bfa091f8a0a07556.tar.gz hurd-4e2d5a81bb2834f7393e9847bfa091f8a0a07556.tar.bz2 hurd-4e2d5a81bb2834f7393e9847bfa091f8a0a07556.zip |
libihash: provide a general purpose hash algorithm
* libdiskfs/name-cache.c: Move the Murmur3 algorithm...
* libihash/murmur3.c: ... here, and properly attribute the code.
* libihash/ihash.h (hurd_ihash_hash32): New prototype.
* libihash/Makefile (SRCS): Add new file.
Diffstat (limited to 'libihash/ihash.h')
-rw-r--r-- | libihash/ihash.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libihash/ihash.h b/libihash/ihash.h index 28fefe80..356f6473 100644 --- a/libihash/ihash.h +++ b/libihash/ihash.h @@ -349,5 +349,10 @@ int hurd_ihash_remove (hurd_ihash_t ht, hurd_ihash_key_t key); was provided to hurd_ihash_add(). This call is faster than hurd_ihash_remove(). */ void hurd_ihash_locp_remove (hurd_ihash_t ht, hurd_ihash_locp_t locp); + +/* We provide a general purpose hash function. This function can be + used with the generalized key interface to use arbitrary data as + keys using this library. */ +uint32_t hurd_ihash_hash32 (const void *buf, size_t len, uint32_t seed); #endif /* _HURD_IHASH_H */ |