cryptoRNG method Null safety

Uint8List cryptoRNG ()

Crypto-Strong RNG. All platforms, unknown speed, cryptographically strong (theoretically)

Implementation

static Uint8List cryptoRNG() {
  var b = Uint8List(16);
  var rand = Random.secure();
  for (var i = 0; i < 16; i++) {
    b[i] = rand.nextInt(256);
  }
  return b;
}