title: Decrypt SHA encrypted string
body: <p>I have encrypted a string using the above code.</p>
  
  <pre><code>public String encrypt(String generatedKey)
      {
              try {
                  MessageDigest md = MessageDigest.getInstance("SHA");
                  md.update(generatedKey.getBytes("UTF-8"));
                  byte digest[] = md.digest();
                  return (new BASE64Encoder()).encode(digest);
              }
              catch (Exception e) {
                  return null;
              }
  
      }
  </code></pre>
  
  <p>Similarly i need a code to decrypt the above generated code. How can i do this?</p>