31#ifndef JUNO_HASH_DJB2_H
32#define JUNO_HASH_DJB2_H
48static inline JUNO_RESULT_SIZE_T
JunoHash_Djb2(
const uint8_t *pcBuff,
size_t zBuffSize)
50 JUNO_RESULT_SIZE_T tResult = {0, 0};
57 for(
size_t i = 0; i < zBuffSize; i++)
59 zHash = ((zHash << 5) + zHash) + pcBuff[i];
#define JUNO_STATUS_NULLPTR_ERROR
A required pointer argument was NULL or invalid.
Definition status.h:63
#define JUNO_STATUS_SUCCESS
Operation completed successfully.
Definition status.h:59
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:48
Status codes and failure-handling helpers for LibJuno.
Common module result type aliases used throughout LibJuno.