seed method

  1. @override
void seed(
  1. covariant KeyParameter param
)
override

Seed the RNG with some entropy (look at package cipher_entropy providing entropy sources).

Implementation

@override
void seed(covariant KeyParameter param) {
  if (param.key.length != 32) {
    throw ArgumentError('Fortuna PRNG can only be used with 256 bits keys');
  }

  final iv = Uint8List(16);
  iv[15] = 1;
  _prng.seed(ParametersWithIV(param, iv));
}