title: Problem with javax.crypto.Cipher. Some characters are broken in dercypted string
body: <p>When I am using (encrypt/decrypt)  javax.crypto.Cipher class for long string, some characters in output string are invalid.</p>
  
  <pre><code>//ecnryption
   byte[] inputBytes = str.getBytes();
   cypheredBytes = cipher.doFinal(inputString, 0, inputBytes, outputBytes, 0);
   return new String(outputBytes, 0, cypheredBytes);
  
  //decryption
   byte[] inputBytes = str.getBytes();
   cypheredBytes = cipher.doFinal (inputBytes, 0, inputBytes.length, outputBytes, 0);
   return new String(outputBytes, 0, cypheredBytes);
  </code></pre>