title: How to decrypt an encrypted String in java
body: <p>I have <code>String s="abc";</code>
  the encryption string is showing : <code>ðá£ÅÉûË¿~?‰+×µÚ</code>
  and decrypted the same value.</p>
  
  <p>But now I have the same encryption string as <code>ðá£ÅÉûË¿~?‰+×µÚ</code>, can I get/ decrypt it bace? below code i am using.</p>
  
  <pre><code>String key = "Bar12345Bar12345"; // 128 bit key
  // Create key and cipher
  Key aesKey = new SecretKeySpec(key.getBytes(), "AES");
  Cipher cipher = Cipher.getInstance("AES");
  // encrypt the text
  cipher.init(Cipher.ENCRYPT_MODE, aesKey);
  byte[] encrypted = cipher.doFinal(text.getBytes());
  String e=new String(encrypted);
  byte[] encrypted1 = cipher.doFinal(e.getBytes());
  System.out.println(encrypted.length+" "+encrypted1.length);
  System.out.println(e);
  // decrypt the text
  cipher.init(Cipher.DECRYPT_MODE, aesKey);
  String decrypted = new String(cipher.doFinal(encrypted));
  System.out.println(decrypted);
  </code></pre>