-
Notifications
You must be signed in to change notification settings - Fork 0
/
keydb.h
46 lines (32 loc) · 870 Bytes
/
keydb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef KEYDB_H_
#define KEYDB_H_
#include <db.h>
#include "types.h"
#include "ibf.h"
#include "setdiff.h"
struct keydb_t *
open_key_db(const char *filename, char create);
int
query_key_db(struct keydb_t *db, const char *query, int max_results,
struct pgp_key_t *keys, char exact, int after);
int
ingest_file(struct keydb_t *db, const char *filename, float excl_pct);
int
close_key_db(struct keydb_t *db);
int
peer_with(struct keydb_t *db, char *srv);
int
retry_rdlock(struct keydb_t *db);
int
retry_wrlock(struct keydb_t *db);
int
unlock(struct keydb_t *db);
struct inv_bloom_t *
get_bloom(struct keydb_t *db, int idx);
struct strata_estimator_t *
get_strata(struct keydb_t *db, int idx);
int
insert_key(struct keydb_t *db, struct pgp_key_t *pgp_key, int index);
int
retrieve_key(struct keydb_t *db, struct pgp_key_t *key, fp160 keyid);
#endif