jwt: use sys_rand_get directly
use sys_rand_get() directly. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
parent
3ffad11b22
commit
295aa36e60
|
@ -255,11 +255,7 @@ static int setup_prng(void)
|
|||
|
||||
uint8_t entropy[TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE];
|
||||
|
||||
for (int i = 0; i < sizeof(entropy); i += sizeof(uint32_t)) {
|
||||
uint32_t rv = sys_rand32_get();
|
||||
|
||||
memcpy(entropy + i, &rv, sizeof(uint32_t));
|
||||
}
|
||||
sys_rand_get(entropy, sizeof(entropy));
|
||||
|
||||
int res = tc_ctr_prng_init(&prng_state,
|
||||
(const uint8_t *) &entropy, sizeof(entropy),
|
||||
|
|
Loading…
Reference in a new issue