mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Refactor hashtables to use indices instead of pointers, use blake2 as a hash, mycrypt renamed to 3proxy_crypt
This commit is contained in:
1 parent
4ee7f71fb9
commit
f1af44f3a9
11 files changed
+880
-136
No files matched your search
+6
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user