title: OpenJDK 1.6 and SecureRandom/KeyGenerator (what is available?)
body: <p>All of the following result in <code>"java.security.NoSuchAlgorithmException: SHA  not SecureRandom available"</code> (or similar).</p>
  
  <pre><code>SecureRandom prng = SecureRandom.getInstance("SHA256");
  SecureRandom prng = SecureRandom.getInstance("SHA-256");
  SecureRandom prng = SecureRandom.getInstance("SHA1");
  SecureRandom prng = SecureRandom.getInstance("SHA-1");
  SecureRandom prng = SecureRandom.getInstance("SHA");
  </code></pre>
  
  <p>Similar for the following (<code>"java.security.NoSuchAlgorithmException: SHA KeyGenerator not available"</code>):</p>
  
  <pre><code>KeyGenerator kgen = KeyGenerator.getInstance("SHA256");
  KeyGenerator kgen = KeyGenerator.getInstance("SHA-256");
  KeyGenerator kgen = KeyGenerator.getInstance("SHA1");
  KeyGenerator kgen = KeyGenerator.getInstance("SHA-1");
  KeyGenerator kgen = KeyGenerator.getInstance("SHA");
  </code></pre>
  
  <p>What generators are available in OpenJDK? According to <a href="http://download.oracle.com/javase/1.5.0/docs/guide/security/jce/JCERefGuide.html#AppA" rel="nofollow">Standard Algorithm Names</a>, it looks like the SHA family should be available (at least for SecureRandom).</p>
  
  <p>Sorry for the lame Java question. I'm a Crypto++ and OpenSSL kind of guy, and Google is returning a lot of noise. I'm working in Eclipse if it matters.</p>
  
  <p>Jeff</p>