Refactor hashtables to use indices instead of pointers, use blake2 as a hash, mycrypt renamed to 3proxy_crypt

This commit is contained in:
Vladimir Dubrovin committed 2026-04-18 15:12:43 +03:00
1 parent 4ee7f71fb9
commit f1af44f3a9
11 files changed
+880 -136

No files matched your search

+6 -4
View File
@@ -754,10 +754,12 @@ struct child {
unsigned char **argv;
};
#define HASH_SIZE (16)
struct hashentry {
unsigned char hash[sizeof(unsigned)*4];
uint8_t hash[HASH_SIZE];
time_t expires;
struct hashentry *next;
int inext;
char value[4];
};
@@ -765,9 +767,9 @@ struct hashtable {
unsigned hashsize;
unsigned recsize;
unsigned rnd[4];
struct hashentry ** hashtable;
int * ihashtable;
uint8_t * hashvalues;
struct hashentry * hashempty;
int ihashempty;
void (*index2hash)(const void *index, unsigned char *hash, const unsigned char *rnd);
int grow;
time_t compacted;