This patch adds the NK_config struct to the C API that stores the
general configuration of a Nitrokey device. It also adds the
NK_read_config_struct and NK_write_config_struct functions to make the
API easier to use. While NK_write_config_struct is only a convenience
method, NK_read_config_struct makes the API more safe as the user no
longer has to read the data from a pointer to an array.
This patch also extends the test_read_write_config test case with the
two new functions.
This patch adds the NK_config struct to the C API that stores the general configuration of a Nitrokey device. It also adds the NK_read_config_struct and NK_write_config_struct functions to make the API easier to use. While NK_write_config_struct is only a convenience method, NK_read_config_struct makes the API more safe as the user no longer has to read the data from a pointer to an array.
This patch also extends the test_read_write_config test case with the two new functions.