Tor
0.4.7.0-alpha-dev
|
Implementation for a set of digests. More...
#include "orconfig.h"
#include "lib/container/bloomfilt.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/defs/digest_sizes.h"
#include "lib/crypt_ops/digestset.h"
#include "ext/siphash.h"
Go to the source code of this file.
Functions | |
static uint64_t | bloomfilt_digest_hash (const struct sipkey *key, const void *item) |
digestset_t * | digestset_new (int max_guess) |
void | digestset_add (digestset_t *set, const char *digest) |
int | digestset_probably_contains (const digestset_t *set, const char *digest) |
Implementation for a set of digests.
Definition in file digestset.c.
void digestset_add | ( | digestset_t * | set, |
const char * | digest | ||
) |
Add digest to set.
All future queries for digest in set will return true. Removing items is not possible.
Definition at line 44 of file digestset.c.
digestset_t* digestset_new | ( | int | max_guess | ) |
Allocate and return an digestset, suitable for holding up to max_guess distinct values.
Definition at line 30 of file digestset.c.
int digestset_probably_contains | ( | const digestset_t * | set, |
const char * | digest | ||
) |
Return true if digest is a member of set. (And probably, return false if digest is not a member of set.)
Definition at line 54 of file digestset.c.