27 #if defined(ASCON_TRNG_ZEPHYR_CSRAND)
29 #include <zephyr/random/rand32.h>
34 if (sys_csrand_get(out, outlen) == 0)
38 memset(out, 0, outlen);
42 #elif defined(ASCON_TRNG_ZEPHYR_BTRAND)
44 #include <zephyr/bluetooth/crypto.h>
49 if (bt_rand(out, outlen) == 0)
53 memset(out, 0, outlen);
int ascon_trng_generate(unsigned char *out, size_t outlen)
Generates a buffer of bytes from the system TRNG source.
Access to the system's random number source.