secureRandomBytes function
Generate length cryptographically-strong random bytes.
Implementation
Uint8List secureRandomBytes(int length) {
final random = Random.secure();
return Uint8List.fromList(
List<int>.generate(length, (_) => random.nextInt(256)),
);
}