title: Is there an encryption not working on string format
body: <p>I have facing issue after applying encryption into a string, I want to decrypt that encrypted_string to a normal string, But none of the examples is working.</p>
  
  <p>Also, they are working for byte array code, Byte_array encrypted and decrypted very well, But I need this working for the string. </p>
  
  <p>Example, I tried already,
  <a href="https://stackoverflow.com/questions/23561104/how-to-encrypt-and-decrypt-string-with-my-passphrase-in-java-pc-not-mobile-plat">How to encrypt and decrypt String with my passphrase in Java (Pc not mobile platform)?</a></p>
  
  <pre><code>public static String encrypt(String strClearText,String strKey) throws Exception{
      String strData="";
  
      try {
          SecretKeySpec skeyspec=new SecretKeySpec(strKey.getBytes(),"Blowfish");
          Cipher cipher=Cipher.getInstance("Blowfish");
          cipher.init(Cipher.ENCRYPT_MODE, skeyspec);
          byte[] encrypted=cipher.doFinal(strClearText.getBytes());
          strData=new String(encrypted);
  
      } catch (Exception e) {
          e.printStackTrace();
          throw new Exception(e);
      }
      return strData;
  }
  
  public static String decrypt(String strEncrypted,String strKey) throws Exception{
      String strData="";
  
      try {
          SecretKeySpec skeyspec=new SecretKeySpec(strKey.getBytes(),"Blowfish");
          Cipher cipher=Cipher.getInstance("Blowfish");
          cipher.init(Cipher.DECRYPT_MODE, skeyspec);
          byte[] decrypted=cipher.doFinal(strEncrypted.getBytes());
          strData=new String(decrypted);
  
      } catch (Exception e) {
          e.printStackTrace();
          throw new Exception(e);
      }
      return strData;
  }
  </code></pre>
  
  <p><code>String</code> to <code>byte[]</code> then <code>byte[]</code> to <code>string</code> conversion not working properly?</p>