31#ifndef JUNO_HASH_DJB2_H
32#define JUNO_HASH_DJB2_H
47static inline JUNO_RESULT_SIZE_T
JunoHash_Djb2(
const uint8_t *pcBuff,
size_t zBuffSize)
49 JUNO_RESULT_SIZE_T tResult = {0, 0};
56 for(
size_t i = 0; i < zBuffSize; i++)
58 zHash = ((zHash << 5) + zHash) + pcBuff[i];
#define JUNO_STATUS_NULLPTR_ERROR
A required pointer argument was NULL or invalid.
Definition status.h:60
#define JUNO_STATUS_SUCCESS
Operation completed successfully.
Definition status.h:56
static JUNO_RESULT_SIZE_T JunoHash_Djb2(const uint8_t *pcBuff, size_t zBuffSize)
Compute djb2 hash over a byte buffer.
Definition hash_djb2.h:47
Status codes and failure-handling helpers for LibJuno.
Common module result type aliases used throughout LibJuno.