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