secureRandomBytes function

Uint8List secureRandomBytes(
  1. int length
)

Implementation

Uint8List secureRandomBytes(int length) {
  final random = Random.secure();
  return Uint8List.fromList(
      List<int>.generate(length, (_) => random.nextInt(256)));
}