genFortunaRaw method

Uint8List genFortunaRaw({
  1. int len = 32,
})

Generate cryptographically-secure random string using the Fortuna algorithm. The string is not encoded and returned as a Uint8List. Thus, this is for use with raw classes.

This should be used for all cases where randomness is of high importance. This includes, but is not limited to, key generation.

Defaults to length 32 bytes.

Implementation

Uint8List genFortunaRaw({int len = 32}) {
  rand ??= _getFortunaRandom();
  return rand!.nextBytes(len);
}