generateRandom function

Uint8List generateRandom({
  1. int size = 32,
})

Implementation

Uint8List generateRandom({int size = 32}) {
  if (_randomGenerator == null) {
    _randomGenerator = FortunaRandom();
    _randomGenerator!.seed(KeyParameter(
        platform.Platform.instance.platformEntropySource().getBytes(32)));
  }

  final r = _randomGenerator!.nextBytes(size);

  return r;
}