Changed the random number generator static seed by using the current elapsed time in ms

This commit is contained in:
anschrammh 2023-12-18 21:12:08 +01:00
parent bdd89aae41
commit c0a6b2c93f

View File

@ -78,7 +78,7 @@ uint32_t random_gen_6_digit(void)
unsigned char random_buf[6] = {0};
uint32_t output_num = 0;
tls_crypto_random_init(0x19031998, CRYPTO_RNG_SWITCH_16);
tls_crypto_random_init(elapsed_ms(), CRYPTO_RNG_SWITCH_16);
tls_crypto_random_bytes(random_buf, sizeof random_buf);
tls_crypto_random_stop();