libcoap 4.3.1
|
Definition of hash key type and helper functions. More...
Go to the source code of this file.
Macros | |
#define | coap_hash(String, Length, Result) coap_hash_impl((String),(Length),(Result)) |
#define | COAP_DEFAULT_HASH |
#define | coap_str_hash(Str, H) |
Calls coap_hash() with given coap_string_t object as parameter. More... | |
Typedefs | |
typedef unsigned char | coap_key_t[4] |
Functions | |
void | coap_hash_impl (const unsigned char *s, size_t len, coap_key_t h) |
Calculates a fast hash over the given string s of length len and stores the result into h . More... | |
Definition of hash key type and helper functions.
Definition in file coap_hashkey.h.
#define COAP_DEFAULT_HASH |
Definition at line 42 of file coap_hashkey.h.
#define coap_hash | ( | String, | |
Length, | |||
Result | |||
) | coap_hash_impl((String),(Length),(Result)) |
Definition at line 38 of file coap_hashkey.h.
#define coap_str_hash | ( | Str, | |
H | |||
) |
Calls coap_hash() with given coap_string_t
object as parameter.
Str | Must contain a pointer to a coap string object. |
H | A coap_key_t object to store the result. |
Definition at line 55 of file coap_hashkey.h.
typedef unsigned char coap_key_t[4] |
Definition at line 24 of file coap_hashkey.h.
void coap_hash_impl | ( | const unsigned char * | s, |
size_t | len, | ||
coap_key_t | h | ||
) |
Calculates a fast hash over the given string s
of length len
and stores the result into h
.
Depending on the exact implementation, this function cannot be used as one-way function to check message integrity or simlar.
s | The string used for hash calculation. |
len | The length of s . |
h | The result buffer to store the calculated hash key. |
Definition at line 19 of file coap_hashkey.c.