randomBytes static method
Implementation
static Uint8List randomBytes(int length) {
final random = Random.secure();
final Uint8List bytes = Uint8List(length);
for (var i = 0; i < length; i++) {
bytes[i] = random.nextInt(256);
}
return bytes;
}