definition of hash key type and helper functions
More...
Go to the source code of this file.
|
void | coap_hash_impl (const unsigned char *s, unsigned int 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 hashkey.h.
§ __COAP_DEFAULT_HASH
#define __COAP_DEFAULT_HASH |
§ coap_hash
#define coap_hash |
( |
|
String, |
|
|
|
Length, |
|
|
|
Result |
|
) |
| coap_hash_impl((String),(Length),(Result)) |
§ coap_str_hash
#define coap_str_hash |
( |
|
Str, |
|
|
|
H |
|
) |
| |
Calls coap_hash() with given str
object as parameter.
- Parameters
-
Str | Must contain a pointer to a coap string object. |
H | A coap_key_t object to store the result. |
Definition at line 51 of file hashkey.h.
§ coap_key_t
typedef unsigned char coap_key_t[4] |
§ coap_hash_impl()
void coap_hash_impl |
( |
const unsigned char * |
s, |
|
|
unsigned int |
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.
- Parameters
-
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 15 of file hashkey.c.