Add saving of hashtables to a file

Cache the user information to file in order to allow authentication without backend databases
This commit is contained in:
Mark Riddoch
2015-02-06 11:44:29 +00:00
parent 85a38c9600
commit bc0d303b27
5 changed files with 358 additions and 9 deletions

View File

@ -112,6 +112,14 @@ void hashtable_get_stats(
int* hashsize,
int* nelems,
int* longest);
extern int hashtable_save(HASHTABLE *,
char *,
int (*keywrite)(int, void*),
int (*valuewrite)(int, void*));
extern int hashtable_load(HASHTABLE *,
char *,
void *(*keyread)(int),
void *(*valueread)(int));
extern HASHITERATOR *hashtable_iterator(HASHTABLE *);
/**< Allocate an iterator on the hashtable */