mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/random: shaxprng init use digest not state
This commit is contained in:
parent
7232c5291d
commit
0b48298d95
@ -152,8 +152,8 @@ void random_init_by_array(uint32_t init_key[], int key_length)
|
||||
_shax_update(&ctx, init_key, key_length);
|
||||
_shax_final(&ctx, digestdata);
|
||||
|
||||
/* copy seeded SHA1 state to PRNG state */
|
||||
memcpy(prng_state, &ctx.state, STATE_SIZE);
|
||||
/* copy SHA digestdata to PRNG state */
|
||||
memcpy(prng_state, digestdata, STATE_SIZE);
|
||||
|
||||
/* reset position indicator */
|
||||
datapos = STATE_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user