FNV-1a hashing function.
More...
#include <stdint.h>
#include <stdlib.h>
Go to the source code of this file.
|
static uint32_t | fnvhash_32_str (const char *char_p) |
| Get the FNV-1a 32-bit hash of a char array (ending with a \0 ).
|
|
static uint32_t | fnvhash_32 (const uint8_t *char_p, const size_t length) |
| Get the FNV-1a 32-bit hash of a string of bytes.
|
|
FNV-1a hashing function.
- Note
- FNV-1a is not a cryptographic hashing function.
Source:
◆ fnvhash_32()
static uint32_t fnvhash_32 |
( |
const uint8_t * | char_p, |
|
|
const size_t | length ) |
|
inlinestatic |
Get the FNV-1a 32-bit hash of a string of bytes.
- Parameters
-
[in] | char_p | Pointer to the string of bytes. |
[in] | length | Number of bytes. |
- Returns
- A 32-bit hash of the bytes.
◆ fnvhash_32_str()
static uint32_t fnvhash_32_str |
( |
const char * | char_p | ) |
|
|
inlinestatic |
Get the FNV-1a 32-bit hash of a char array (ending with a \0
).
- Parameters
-
[in] | char_p | Pointer to the string of bytes. |
- Returns
- A 32-bit hash of the bytes.