libcontrac
A library for contact tracing
rpi.h
Go to the documentation of this file.
1 
24 #ifndef __RPI_H
25 #define __RPI_H
26 
27 // Includes
28 
29 #include "contrac/contrac.h"
30 #include "contrac/dtk.h"
31 
32 // Defines
33 
38 #define RPI_SIZE (16)
39 
45 #define RPI_SIZE_BASE64 (24)
46 
53 #define RPI_INTERVAL_MAX (144)
54 
55 // Structures
56 
62 typedef struct _Rpi Rpi;
63 
64 // Function prototypes
65 
66 Rpi * rpi_new();
67 void rpi_delete(Rpi * data);
68 
69 bool rpi_generate_proximity_id(Rpi * data, Dtk const * dtk, uint8_t time_interval_number);
70 unsigned char const * rpi_get_proximity_id(Rpi const * data);
71 uint8_t rpi_get_time_interval_number(Rpi const * data);
72 void rpi_assign(Rpi * data, unsigned char const * rpi_bytes, uint8_t time_interval_number);
73 bool rpi_compare(Rpi const * data, Rpi const * comparitor);
74 
75 // Function definitions
76 
77 #endif // __RPI_H
78 
unsigned char const * rpi_get_proximity_id(Rpi const *data)
Definition: rpi.c:180
void rpi_assign(Rpi *data, unsigned char const *rpi_bytes, uint8_t time_interval_number)
Definition: rpi.c:214
bool rpi_generate_proximity_id(Rpi *data, Dtk const *dtk, uint8_t time_interval_number)
Definition: rpi.c:114
uint8_t rpi_get_time_interval_number(Rpi const *data)
Definition: rpi.c:193
Core Contact Tracing functionality.
Daily Tracing Key functionality.
Rpi * rpi_new()
Definition: rpi.c:77
void rpi_delete(Rpi *data)
Definition: rpi.c:90
The structure used to represent a Rolling Proximity Identifier.
Definition: rpi.c:62
bool rpi_compare(Rpi const *data, Rpi const *comparitor)
Definition: rpi.c:226