title: Converting String to Sha-256 Hash
body: <p>I want to convert a String to a SHA-256 Hash. I am using this code:</p>
  
  <pre><code>String text = "YOLO";
  MessageDigest digest = MessageDigest.getInstance("SHA-256");
  byte[] hash = digest.digest(text.getBytes("UTF-8"));
  System.out.println(hash.toString());
  </code></pre>
  
  <p>The problem is, when I start the program, it prints</p>
  
  <blockquote>
    <p>[B@28d93b30</p>
  </blockquote>
  
  <p>Why is this, and how can solve this?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Fihdi</p>