title: Is the following random number generation without bias?
body: <p>Would the following code produce a random number with or without bias?</p>
  
  <pre><code>    int numberToGenerate = 20;
      int rangeUpperLimit = 30;
      SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
  
      for (int i = 0; i &lt; numberToGenerate; i++) {
          int randomInt = random.nextInt(rangeUpperLimit); 
          // Do something with it.
      }        
  </code></pre>
  
  <p>The values are used to pick <code>chars</code> from a <code>String</code> of length 30, hence the range 0-29. The code to pick the <code>char</code> values is omitted as it is not relevant to the question.</p>