title: SHA1 decryption of a string in Java
body: <p>I found this code from here <a href="https://stackoverflow.com/questions/5980658/how-to-sha1-hash-a-string-in-android">How to SHA1 hash a string in Android?</a> to encrypt a string using SHA1 which is working perfectly fine,</p>
  
  <pre><code>import java.io.UnsupportedEncodingException;
  import java.security.MessageDigest;
  import java.security.NoSuchAlgorithmException;
  
  public class SHA1Encryption {
  
      public static String SHA1(String text) throws NoSuchAlgorithmException,
              UnsupportedEncodingException {
          MessageDigest md = MessageDigest.getInstance("SHA-1");
          md.update(text.getBytes("iso-8859-1"), 0, text.length());
          byte[] sha1hash = md.digest();
          return convertToHex(sha1hash);
      }
  
      private static String convertToHex(byte[] data) {
          StringBuilder buf = new StringBuilder();
          for (byte b : data) {
              int halfbyte = (b &gt;&gt;&gt; 4) &amp; 0x0F;
              int two_halfs = 0;
              do {
                  buf.append((0 &lt;= halfbyte) &amp;&amp; (halfbyte &lt;= 9) ? (char) ('0' + halfbyte)
                          : (char) ('a' + (halfbyte - 10)));
                  halfbyte = b &amp; 0x0F;
              } while (two_halfs++ &lt; 1);
          }
          return buf.toString();
      }
  
  }
  </code></pre>
  
  <p>but I need to decrypt it back to the original string.</p>
  
  <p>Can anyone help me out?</p>