diff options
-rw-r--r-- | ot_udp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -26,9 +26,12 @@ static uint32_t g_key_of_the_hour[2] = {0}; | |||
26 | static ot_time g_hour_of_the_key; | 26 | static ot_time g_hour_of_the_key; |
27 | 27 | ||
28 | static void udp_generate_rijndael_round_key() { | 28 | static void udp_generate_rijndael_round_key() { |
29 | uint8_t key[16]; | 29 | uint32_t key[16]; |
30 | key[0] = random(); key[1] = random(); key[2] = random(); key[3] = random(); | 30 | key[0] = random(); |
31 | rijndaelKeySetupEnc128( g_rijndael_round_key, key ); | 31 | key[1] = random(); |
32 | key[2] = random(); | ||
33 | key[3] = random(); | ||
34 | rijndaelKeySetupEnc128( g_rijndael_round_key, (uint8_t*)key ); | ||
32 | 35 | ||
33 | g_key_of_the_hour[0] = random(); | 36 | g_key_of_the_hour[0] = random(); |
34 | g_hour_of_the_key = g_now_minutes; | 37 | g_hour_of_the_key = g_now_minutes; |