randomBytes function
Generates a list of length
random bytes.
By default, cryptographically secure SecureRandom.fast is used.
Implementation
Uint8List randomBytes(int length, {Random? random}) {
final bytes = Uint8List(length);
fillBytesWithSecureRandom(bytes, random: random);
return bytes;
}