setupRandom static method

void setupRandom(
  1. CbGenerateRandom? random, {
  2. bool seal = false,
})

Implementation

static void setupRandom(CbGenerateRandom? random, {bool seal = false}) {
  _checkNotSealed('setupRandom');
  if (random == null) {
    _generateRandom = (length) {
      return prng.nextBytes(length);
    };
  } else {
    _generateRandom = random;
  }
  if (seal) QuickCrypto.seal();
}