Uint8List randomBytes(int size) { var random = Random.secure(); return Uint8List.fromList( List.generate(size, (index) => random.nextInt(256))); }