randomBytes function

List<int> randomBytes(
  1. int length
)

Implementation

List<int> randomBytes(int length) {
  final random = math.Random.secure();
  return List<int>.generate(length, (i) => random.nextInt(256));
}