mathRNG method - UuidUtil class - uuid_util library - Dart API
Description: API docs for the mathRNG method from the UuidUtil class, for the Dart programming language.

# mathRNG method Null safety

Uint8List mathRNG(

1. {int seed = -1}

)

Math.Random()-based RNG. All platforms, fast, not cryptographically strong. Optional Seed passable.

## Implementation

    static Uint8List mathRNG({int seed = -1}) {
      final b = Uint8List(16);
      final rand = (seed == -1) ? _random : Random(seed);

      for (var i = 0; i < 16; i++) {
        b[i] = rand.nextInt(256);
      }

      return b;
    }