libcoap  4.3.0
murmur3.h
Go to the documentation of this file.
1 
31 #ifndef MURMUR_3_32_H
32 #define MURMUR_3_32_H
33 
34 #include <stdint.h>
35 
36 typedef struct murmur3_context_t {
37  size_t total_len;
38  uint32_t key;
39  uint32_t hashval;
40  uint8_t len;
42 
49 
58 void murmur3_32_update(murmur3_context_t *mctx, const void *data, size_t len);
59 
70 
81 uint32_t murmur3_32(const void *data, size_t len);
82 
83 #endif /* MURMUR_3_32_H */
struct murmur3_context_t murmur3_context_t
Naïve implementation of Murmur3 for 32 bit with update functionality.
void murmur3_32_update(murmur3_context_t *mctx, const void *data, size_t len)
Updates the state of the murmur3 context object mctx with len bytes from data.
Definition: murmur3.c:98
uint32_t murmur3_32_finalize(murmur3_context_t *mctx)
Finalizes the given murmur3 context mctx and calculates the resulting murmur3 hash value.
Definition: murmur3.c:123
uint32_t murmur3_32(const void *data, size_t len)
Calculcates the murmur3 hash value of data.
Definition: murmur3.c:145
void murmur3_32_init(murmur3_context_t *mctx)
Initializes the provided murmur3 context object mctx.
Definition: murmur3.c:46
Naïve implementation of Murmur3 for 32 bit with update functionality.
Definition: murmur3.h:36
uint8_t len
Definition: murmur3.h:40
size_t total_len
Definition: murmur3.h:37
uint32_t hashval
Definition: murmur3.h:39
uint32_t key
Definition: murmur3.h:38