Is it possible to encrypt a string using java?
<p>I want to know that Can we encrypt a text using Java and then again getting back to normal text? If anyone is having idea please help. Any help regarding this will be appreciated.
Thanks in advance. </p>

<pre><code>String plaintext = "HelloWorld";
MessageDigest m = MessageDigest.getInstance("MD5");
m.reset();
m.update(plaintext.getBytes());
byte[] digest = m.digest();
BigInteger bigInt = new BigInteger(1,digest);
String hashtext = bigInt.toString(16); 
// Now we need to zero pad it if you actually  want the full 32 chars.
 while(hashtext.length() &lt; 32 ){
     hashtext = "0"+hashtext;           
  }
</code></pre>

<p>I have tried this. Now I want to convert it back to Original string.</p>
