nextUint8 property

int get nextUint8

Generates and returns the next 8 bits (1 byte) of pseudorandom data from the Fortuna PRNG.

If the internal buffer is exhausted, this method generates new blocks of random data to replenish it.

Returns: An integer representing the next 8 bits (1 byte) of pseudorandom data.

This method is used to obtain a single byte of pseudorandom data from the Fortuna PRNG.

Implementation

int get nextUint8 {
  if (_c == _out.length) {
    final out = List<int>.filled(16, 0);
    _generateBlocks(out, 1);
    _out.setAll(0, out);
    _c = 0;
  }
  return _out[_c++];
}