function random_bits(random_state &) random¶
template <size_t N>
requires(N > sizeof(random_state))
KFR_INTRINSIC vec<u8, N> random_bits(random_state& state) Generates more than 16 bytes of random data.
For output sizes greater than 16 bytes, this function recursively combines smaller calls to random_bits to generate the requested number of random bytes.
| N | Number of random bytes to generate (N > 16). |
| state | Reference to the random number generator state. |
| A vector of N random bytes. |
Note
This generator is stateless beyond its internal 128-bit state. It holds no internal buffer, so each call to random_bits advances the state and generates at least 128 bits of random data. To maintain deterministic behavior across runs, always request the same size N in each usage scenario.
Defined at base/random_bits.hpp:190