libcontrac
A library for contact tracing
dtk.h
Go to the documentation of this file.
1 
24 #ifndef __DTK_H
25 #define __DTK_H
26 
27 // Includes
28 
29 // Defines
30 
35 #define DTK_SIZE (16)
36 
42 #define DTK_SIZE_BASE64 (24)
43 
44 // Structures
45 
51 typedef struct _Dtk Dtk;
52 
53 // Function prototypes
54 
55 Dtk * dtk_new();
56 void dtk_delete(Dtk * data);
57 
58 bool dtk_generate_daily_key(Dtk * data, Contrac const * contrac, uint32_t day_number);
59 unsigned char const * dtk_get_daily_key(Dtk const * data);
60 uint32_t dtk_get_day_number(Dtk const * data);
61 void dtk_assign(Dtk * data, unsigned char const * dtk_bytes, uint32_t day_number);
62 
63 // Function definitions
64 
65 #endif // __DTK_H
66 
unsigned char const * dtk_get_daily_key(Dtk const *data)
Definition: dtk.c:191
bool dtk_generate_daily_key(Dtk *data, Contrac const *contrac, uint32_t day_number)
Definition: dtk.c:113
void dtk_delete(Dtk *data)
Definition: dtk.c:91
Dtk * dtk_new()
Definition: dtk.c:78
void dtk_assign(Dtk *data, unsigned char const *dtk_bytes, uint32_t day_number)
Definition: dtk.c:223
uint32_t dtk_get_day_number(Dtk const *data)
Definition: dtk.c:204
The structure used to represent a Daily Tracing Key.
Definition: dtk.c:63