Add initial crypto functionality
[libcontrac.git] / include / contrac / dtk.h
1 /** \ingroup contrac
2 * @file
3 * @author David Llewellyn-Jones
4 * @version $(VERSION)
5 *
6 * @section LICENSE
7 *
8 *
9 *
10 * @brief
11 * @section DESCRIPTION
12 *
13 *
14 *
15 */
16
17 #ifndef __DTK_H
18 #define __DTK_H
19
20 // Includes
21
22 // Defines
23
24 #define DTK_SIZE (16)
25 #define DTK_SIZE_BASE64 (24)
26
27 // Structures
28
29 typedef struct _Dtk Dtk;
30
31 // Function prototypes
32
33 Dtk * dtk_new();
34 void dtk_delete(Dtk * data);
35
36 bool contrac_generate_daily_key(Dtk * data, Contrac const * contrac, uint32_t day_number);
37 const unsigned char * dtk_get_daily_key(Dtk const * data);
38 uint32_t dtk_get_day_number(Dtk const * data);
39 void dtk_assign(Dtk * data, unsigned char const * dtk_bytes, uint32_t day_number);
40
41 // Function definitions
42
43 #endif // __DTK_H
44
45