nextBytes method
Generates and returns a List<int>
containing pseudorandom data of the specified length from the Fortuna PRNG.
Parameters:
length
: An integer specifying the desired length of the pseudorandom data in bytes.
Returns:
A List<int>
containing the requested pseudorandom data.
This method is used to generate and return a sequence of pseudorandom bytes of the specified length.
Implementation
List<int> nextBytes(int length) {
final out = List<int>.filled(length, 0);
for (int i = 0; i < length; i++) {
out[i] = nextUint8;
}
return out;
}