459fb523bb68775279e3ad66b80a7c60890c3d67
1 /** \ingroup DailyTracingKey
3 * @author David Llewellyn-Jones <david@flypig.co.uk>
8 * Copyright David Llewellyn-Jones, 2020
9 * Released under the GPLv2.
11 * @brief Daily Tracing Key functionality
12 * @section DESCRIPTION
14 * This class is used to generate and manage the Daily Tracing Key (DTK). It's
15 * largely internal. The functionality from \ref Contrac should generally be
16 * used in preference to this.
20 /** \addtogroup DailyTracingKey
32 * The size in bytes of a DTK in binary format.
38 * The size in bytes of a DTK in base64 format, not including the null
42 #define DTK_SIZE_BASE64 (24)
47 * An opaque structure for representing a DTK.
49 * The internal structure can be found in dtk.c
51 typedef struct _Dtk Dtk
;
53 // Function prototypes
56 void dtk_delete(Dtk
* data
);
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
);
63 // Function definitions
67 /** @} addtogroup DailyTracingKey */