plugntrust 2.0.0.0
|
PlugnTrust Click example. More...
Macros | |
#define | PARSE_BUF_LEN 0xFF |
#define | DATA_LEN 16 |
#define | AES_DATA_SIZE 16 |
#define | AES_KEY_SIZE 16 |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
PlugnTrust Click example.
This application is showcasing basic functionality of Plug&Trust click board. It gets identify data from device, selects card manager and applet. Then checks free memory, reads all objects and deletes not reserved ones. After that showcases a few of functionality:
The demo application is composed of two sections :
At the start it sets comunication interface from default configuration[I2C]. Reads indetifing data from device, and then selects Card manager and applet. After that it reads free presistant memory, reads all objects and deletes objects that are not reserved by the Applet. Then it generates 2 byte of random data, and gets the version information from the Applet. Thtas followed up with creating binary object and 'MikroE' data is wrriten in it. Then its checked it object is created, and reads data back, in the end its deleted and checked if it still exists. Finally it creates 128AES key (16bytes), and then it encrypts and then decrypts data with that key, and in the end it deletes that key object.
It generates 16bytes of data, writes it in binary object and then reads it and logs it. Then creates AES key and encrypts that random data with it, and then decrypts it. In the end it deletes both AES key object and binary object thats created at the start of task.
#define AES_DATA_SIZE 16 |
#define AES_KEY_SIZE 16 |
#define DATA_LEN 16 |
#define PARSE_BUF_LEN 0xFF |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |