title: "AES engine not initialised" with pointycastle SecureRandom()
body: <p>I want to generate a random BigInt with dynamik length Bits. I am using the pointycastle package to get a SecureRandom BigInt.</p>
  <pre class="lang-dart prettyprint-override"><code>import 'package:pointycastle/pointycastle.dart';
  
  void main(List&lt;String&gt; arguments) {
    print(gen(500));
  }
  
  BigInt gen(int Bits) {
    var n = BigInt.from(1);
    var ran = SecureRandom('Fortuna');
    n = ran.nextBigInteger(Bits);
    return n;
  }
  </code></pre>
  <p>This line throws an exception:</p>
  <pre class="lang-dart prettyprint-override"><code>n = ran.nextBigInteger(Bits);
  </code></pre>
  <pre><code>StateError (Bad state: AES engine not initialised)
  </code></pre>
  <p>This is the complete error in the console:</p>
  <pre><code>Unhandled exception:
  Bad state: AES engine not initialised
  #0      AESFastEngine.processBlock 
  package:pointycastle/block/aes_fast.dart:109
  #1      BlockCtrRandom.nextUint8 
  package:pointycastle/random/block_ctr_random.dart:55
  #2      SecureRandomBase._randomBits 
  package:pointycastle/…/impl/secure_random_base.dart:55
  
  #3      SecureRandomBase.nextBigInteger 
  package:pointycastle/…/impl/secure_random_base.dart:33
  #4      AutoSeedBlockCtrRandom.nextBigInteger.&lt;anonymous closure&gt; 
  package:pointycastle/random/auto_seed_block_ctr_random.dart:69
  #5      AutoSeedBlockCtrRandom._autoReseedIfNeededAfter 
  package:pointycastle/random/auto_seed_block_ctr_random.dart:81
  #6      AutoSeedBlockCtrRandom.nextBigInteger 
  package:pointycastle/random/auto_seed_block_ctr_random.dart:68
  #7      FortunaRandom.nextBigInteger 
  package:pointycastle/random/fortuna_random.dart:46
  #8      gen 
  bin\encrypt.dart:10
  #9      main 
  bin\encrypt.dart:4
  #10     _startIsolate.&lt;anonymous closure&gt;  (dart:isolate-patch/isolate_patch.dart:299:32)
  #11     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:168:12)
  
  
  </code></pre>
  <p>I can't seem to find a solution to this error message anywhere else. I hope u guys can help me. :D</p>