fillNumbers function
Fills the list
with random 32-bit numbers.
Both the start
and length
are in bytes.
Implementation
void fillNumbers(
List<int> list, {
int start = 0,
int? length,
RNG generator = RNG.secure,
}) {
int n = length ?? list.length;
if (n == 0) return;
var rand = HashlibRandom(generator);
for (; n > 0 && start < list.length; ++start, --n) {
list[start] = rand.nextInt();
}
}