title: Is SecureRandom.ints() secure?
body: <p>It is known that SecureRandom class provide strong cryptographic security for generated random number. <code>java.util.Random</code> is insecure for the situation which requires cryptographic security. The typical usage of <code>SecureRandom</code> is:</p>
  
  <pre><code>SecureRandom random = new SecureRandom();
  byte bytes[] = new byte[20];
  random.nextBytes(bytes);
  </code></pre>
  
  <p>However, I met a case:</p>
  
  <pre><code>SecureRandom random = new SecureRandom();
  int number = random.ints();
  </code></pre>
  
  <p>The method <code>ints()</code> is inherited from the <code>java.util.Random</code> class. I am confused when <code>SecureRandom</code> which is a secure random number generator uses a method inherited from the insecure random number generator, whether it is secure?</p>