DRBG<T> constructor

DRBG<T>({
  1. Hash? hash,
  2. dynamic entropy,
  3. dynamic nonce,
  4. dynamic pers,
  5. String? entropyEnc,
  6. String? nonceEnc,
  7. String? persEnc,
})

Implementation

DRBG(
    {Hash? hash,
    dynamic entropy,
    dynamic nonce,
    dynamic pers,
    String? entropyEnc,
    String? nonceEnc,
    String? persEnc}) {
  this.hash = hash;
  this.entropy = (entropy is List<int>)
      ? entropy
      : toArray(entropy, entropyEnc is String ? entropyEnc : 'hex');
  this.nonce = (nonce is List<int>)
      ? nonce
      : toArray(nonce, nonceEnc is String ? nonceEnc : 'hex');
  this.pers = (pers is List<int>)
      ? pers
      : toArray(pers, persEnc is String ? persEnc : 'hex');
  this.init();
}