mirror of
https://github.com/CovidBraceletPrj/CovidBracelet.git
synced 2025-01-09 20:54:26 +01:00
25 lines
614 B
C
25 lines
614 B
C
|
#ifndef BLOOM_H
|
||
|
#define BLOOM_H
|
||
|
|
||
|
#include "record_storage.h"
|
||
|
#include "exposure-notification.h"
|
||
|
|
||
|
typedef struct {
|
||
|
uint8_t* data;
|
||
|
size_t size;
|
||
|
} bloom_filter_t;
|
||
|
|
||
|
/**
|
||
|
* Initialize the bloom filter on basis of the already registerred records.
|
||
|
*/
|
||
|
bloom_filter_t* bloom_init(size_t size);
|
||
|
|
||
|
void bloom_destroy(bloom_filter_t* bloom);
|
||
|
|
||
|
// TODO lome: maybe only use RPI (should be sufficient)
|
||
|
void bloom_add_record(bloom_filter_t* bloom, ENIntervalIdentifier* rpi);
|
||
|
|
||
|
// TODO lome: maybe only use RPI (should be sufficient)
|
||
|
bool bloom_probably_has_record(bloom_filter_t* bloom, ENIntervalIdentifier* rpi);
|
||
|
|
||
|
#endif
|