clibs
Tiny but handy utility libraries for C
Loading...
Searching...
No Matches
hash_table.h File Reference

Constant C string hash table. More...

Go to the source code of this file.

Macros

#define FALSE   0
#define TRUE   1
#define _BOOL_IS_DEFINED

Typedefs

typedef char BOOL
typedef struct hash_table_t hash_table_t

Functions

hash_table_thash_table_new (void)
BOOL hash_table_add (hash_table_t *self, const char *key, const char *value)
const char * hash_table_get (hash_table_t *self, const char *key)
BOOL hash_table_remove (hash_table_t *self, const char *key)
void hash_table_delete (hash_table_t *self)

Detailed Description

Constant C string hash table.

Author
ByteBard
Note
This hash table is implemented as a bucket array and has not been tested with large datasets. Not recommended for high-performance scenarios.
Warning
his hash table uses the simple Djb2 algorithm and is not suitable for security-sensitive contexts.