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:
parent
233fbcdb38
commit
7232c5291d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user