title: Exception when calling MessageDigest.getInstance("SHA256")
body: <p>I have code that works well on Android. When I ported it to my Windows 64-bit machine with JRE 1.6, the code did not work.</p>
  
  <p>When I run the following line of code:</p>
  
  <pre><code>final MessageDigest digest = MessageDigest.getInstance("SHA256")
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <blockquote>
    <p>java.security.NoSuchAlgorithmException: SHA256 MessageDigest not available  at sun.security.jca.GetInstance.getInstance(Unknown Source)
      at java.security.Security.getImpl(Unknown Source)   at
    java.security.MessageDigest.getInstance(Unknown Source)</p>
  </blockquote>
  
  <p>I found on Internet people claiming that it is possible to use SHA256 with the standard crypto provider that comes with Sun JRE and people saying that I need to use another provider like for example Bouncy Castle.</p>
  
  <p>I would prefer not to use a different provider. Is it possible to make it working?</p>