19#include "app_config.h"
28void cx_rng_no_throw(uint8_t *buffer,
size_t len)
32 error = cx_get_random_bytes(buffer, len);
40uint32_t cx_rng_u32_range_func(uint32_t a, uint32_t b, cx_rng_u32_range_randfunc_t randfunc)
42 uint32_t range = b - a;
45 if ((range & (range - 1)) == 0) {
50 uint32_t chunk_size = UINT32_MAX / range;
51 uint32_t last_chunk_value = chunk_size * range;
53 while (r >= last_chunk_value) {
56 return a + r / chunk_size;
Random Number Generation.