Hello, I'm trying to encrypt an array of 16 of a plain text:
uint8 Data_au8[AES128_ECB_PLAIN_TEXT_SIZE] = {
0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
With the array initialized like this, this works fine since it gives the the following encrypted array:

But, this is not what I want my code to do, I want to change the values of the array in my main function, but If I do this:
uint8 Status_u8 = 0x01u;
uint8 Data_au8[AES128_ECB_PLAIN_TEXT_SIZE] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
int main()
{
Data_au8[0] = Status_u8;
Data_au8[1] = Status_u8;
/* Encryption */
}
It doesn't encrypt properly:

What could be causing this?
Thank you in advance!