mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 08:55:40 +03:00
i/c/hashkey.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation issues.
This commit is contained in:
1 parent
9ab6d050e6
commit
5fca704c4e
1 file changed
+14
-15
+14
-15
@@ -3,10 +3,10 @@
|
||||
* Copyright (C) 2010,2011 Olaf Bergmann <bergmann@tzi.org>
|
||||
*
|
||||
* This file is part of the CoAP library libcoap. Please see
|
||||
* README for terms of use.
|
||||
* README for terms of use.
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @file hashkey.h
|
||||
* @brief definition of hash key type and helper functions
|
||||
*/
|
||||
@@ -19,12 +19,11 @@
|
||||
typedef unsigned char coap_key_t[4];
|
||||
|
||||
#ifndef coap_hash
|
||||
/**
|
||||
* Calculates a fast hash over the given string @p s of length @p len
|
||||
* and stores the result into @p h. Depending on the exact
|
||||
* implementation, this function cannot be used as one-way function to
|
||||
* check message integrity or simlar.
|
||||
*
|
||||
/**
|
||||
* Calculates a fast hash over the given string @p s of length @p len and stores
|
||||
* the result into @p h. Depending on the exact implementation, this function
|
||||
* cannot be used as one-way function to check message integrity or simlar.
|
||||
*
|
||||
* @param s The string used for hash calculation.
|
||||
* @param len The length of @p s.
|
||||
* @param h The result buffer to store the calculated hash key.
|
||||
@@ -40,18 +39,18 @@ void coap_hash_impl(const unsigned char *s, unsigned int len, coap_key_t h);
|
||||
#undef __COAP_DEFAULT_HASH
|
||||
#endif /* coap_hash */
|
||||
|
||||
/**
|
||||
/**
|
||||
* Calls coap_hash() with given @c str object as parameter.
|
||||
*
|
||||
*
|
||||
* @param Str Must contain a pointer to a coap string object.
|
||||
* @param H A coap_key_t object to store the result.
|
||||
*
|
||||
*
|
||||
* @hideinitializer
|
||||
*/
|
||||
#define coap_str_hash(Str,H) { \
|
||||
assert(Str); \
|
||||
memset((H), 0, sizeof(coap_key_t)); \
|
||||
coap_hash((Str)->s, (Str)->length, (H)); \
|
||||
#define coap_str_hash(Str,H) { \
|
||||
assert(Str); \
|
||||
memset((H), 0, sizeof(coap_key_t)); \
|
||||
coap_hash((Str)->s, (Str)->length, (H)); \
|
||||
}
|
||||
|
||||
#endif /* _COAP_HASHKEY_H_ */
|
||||
Reference in new issue
Block a user