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
;
41
}
murmur3_context_t
;
42
48
void
murmur3_32_init
(
murmur3_context_t
*mctx);
49
58
void
murmur3_32_update
(
murmur3_context_t
*mctx,
const
void
*data,
size_t
len);
59
69
uint32_t
murmur3_32_finalize
(
murmur3_context_t
*mctx);
70
81
uint32_t
murmur3_32
(
const
void
*data,
size_t
len);
82
83
#endif
/* MURMUR_3_32_H */
murmur3_context_t
struct murmur3_context_t murmur3_context_t
Naïve implementation of Murmur3 for 32 bit with update functionality.
murmur3_32_update
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
murmur3_32_finalize
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
murmur3_32
uint32_t murmur3_32(const void *data, size_t len)
Calculcates the murmur3 hash value of data.
Definition:
murmur3.c:145
murmur3_32_init
void murmur3_32_init(murmur3_context_t *mctx)
Initializes the provided murmur3 context object mctx.
Definition:
murmur3.c:46
murmur3_context_t
Naïve implementation of Murmur3 for 32 bit with update functionality.
Definition:
murmur3.h:36
murmur3_context_t::len
uint8_t len
Definition:
murmur3.h:40
murmur3_context_t::total_len
size_t total_len
Definition:
murmur3.h:37
murmur3_context_t::hashval
uint32_t hashval
Definition:
murmur3.h:39
murmur3_context_t::key
uint32_t key
Definition:
murmur3.h:38
src
murmur3.h
Generated on Mon Jun 21 2021 10:40:33 for libcoap by
1.9.1