fillRandom function

void fillRandom(
  1. ByteBuffer buffer, {
  2. int start = 0,
  3. int? length,
  4. RNG generator = RNG.secure,
})

Fills the buffer with random numbers.

Both the start and length are in bytes.

Implementation

@pragma('vm:prefer-inline')
void fillRandom(
  ByteBuffer buffer, {
  int start = 0,
  int? length,
  RNG generator = RNG.secure,
}) =>
    HashlibRandom(generator).fill(buffer, start, length);