1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

sys/random: reset buffer position on reinitialization

This commit is contained in:
PeterKietzmann 2020-07-10 13:21:11 +02:00
parent 233fbcdb38
commit 7232c5291d

View File

@ -154,6 +154,9 @@ void random_init_by_array(uint32_t init_key[], int key_length)
/* copy seeded SHA1 state to PRNG state */
memcpy(prng_state, &ctx.state, STATE_SIZE);
/* reset position indicator */
datapos = STATE_SIZE;
}
void random_init(uint32_t seed)