Implement the djb2 hash algorithm (http://www.cse.yorku.ca/~oz/hash.html) for normal strings and flash strings.
More...
#include <stdint.h>
#include "../fstrings/FlashString.h"
Go to the source code of this file.
Implement the djb2 hash algorithm (http://www.cse.yorku.ca/~oz/hash.html) for normal strings and flash strings.
Definition in file djb2.h.
◆ hashDjb2() [1/2]
uint32_t ace_common::hashDjb2 |
( |
const __FlashStringHelper * |
fs | ) |
|
|
inline |
Type checked version of hashDjb2Template(T s)
for a flash string (const __FlashStringHelper*).
- Parameters
-
fs | NUL terminated string stored in Flash memory, cannot be nullptr |
Definition at line 77 of file djb2.h.
◆ hashDjb2() [2/2]
uint32_t ace_common::hashDjb2 |
( |
const char * |
s | ) |
|
|
inline |
Type checked version of hashDjb2Template(T s)
for a regular c-string (const uint8_t*) terminated by NUL.
- Parameters
-
s | NUL terminated c-string, cannot be nullptr |
Definition at line 69 of file djb2.h.
◆ hashDjb2Template()
template<typename T >
uint32_t ace_common::hashDjb2Template |
( |
T |
s | ) |
|