I am working on a small code in TinyOS 2.x in which I want to copy values
into an array as following.

uint8_t in[16] =
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
uint8_t var = 0x24;
memcpy(&in, &var, sizeof(uint8_t));

Here I want to generate the value of var randomly and copy that value into
the array in[16]. I tried using memcpy as shown above but I am getting
errors. The code I am trying to modify is TestAES.nc taken from the
following link:
https://github.com/tyll/tinyos-2.x-contrib/tree/master/crypto. Could you
please let me know what am I doing wrong here?

Thanking you for the time & effort.

Regards,
Nivedita Datta
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to