tomSecretsRandomBytes function

Uint8List tomSecretsRandomBytes([
  1. int count = tomSecretsKeyBytes
])

count bytes from the OS's secure generator.

Implementation

Uint8List tomSecretsRandomBytes([int count = tomSecretsKeyBytes]) {
  final random = Random.secure();
  return Uint8List.fromList(List.generate(count, (_) => random.nextInt(256)));
}