Hello!
I try to make a program to encrypt data in AES. The encryption part works well, there is no problem, but i have an issue with a char variables. I am new in C++ and is looks a bit different to C so i ask how to add some alphanumeric characters to an existing char?
My code looks like:
int r1 = rand()%167; //give 23 as answer
char data1[7] = { "12.56 }; //data read by the sensor max -122.99
char data2[8] = {“15786.58”}; //data from second sensor max 99999.99
char data3[8] = {“26352.22”}; //same as second sensor but read from serial port
unsigned char msg[0x90] = { data1[7] . " " . data2[8] . " " . data[3] }; <-Here is a problem, i need to have “12.56 15786.58 26352.22”
I can encrypt the only if a write:
unsigned char msg[0x90] = {“12.56 15786.58 26352.22”};
How to create a space separated char from multiple int and chars on my example?