randomBytes function

Uint8List randomBytes(
  1. int length, {
  2. RNG generator = RNG.secure,
})

Generate a list of random 8-bit numbers of size length

Implementation

@pragma('vm:prefer-inline')
Uint8List randomBytes(
  int length, {
  RNG generator = RNG.secure,
}) =>
    HashlibRandom(generator).nextBytes(length);