FortunaPRNG constructor

FortunaPRNG([
  1. List<int>? seed
])

Constructor for the FortunaPRNG class, initializing the pseudorandom number generator (PRNG).

This constructor sets up the FortunaPRNG instance with an optional initial seed for randomness.

Parameters:

  • seed: An optional List<int> seed used to initialize the PRNG. If not provided, the PRNG will be initialized with a secure random seed.

Example Usage:

// Initialize a FortunaPRNG instance with a custom seed.
List<int> customSeed = // Provide your custom seed here.
FortunaPRNG prng = FortunaPRNG(customSeed);

// Initialize a FortunaPRNG instance with a secure random seed.
FortunaPRNG prng = FortunaPRNG();

This constructor allows you to create a FortunaPRNG instance with a specified initial seed for randomness. If no seed is provided, the PRNG is initialized with a secure random seed.

Implementation

FortunaPRNG([List<int>? seed]) {
  _initKey(seed);
}